dcsimg
About creating JFrames
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   abhi_venugopal
Posted On:   Wednesday, March 26, 2008 02:52 AM

what is the diference between creating a JFrame using the below given 2 methods....

1.class myclass extends JFrame and i use its constructor

2.create Jframe myframe=new JFrame() in a class without extending Jframe

Re: About creating JFrames

Posted By:   stef_p  
Posted On:   Thursday, March 27, 2008 07:33 AM

class a extends JFrame inherits all the JFrame functionality
you can overwrite functions,...

For example if you want to make a FullScreenFrame you can
extend JFrame and when the JFrame is created you set
initial values and make it fullScreen without knowing how it does it.



JFrame f = new JFrame("test")

can only be modified by calling functions on it.

f.setVisible(true)




Does that awnser your question?
About | Sitemap | Contact