when to use/not use JFrame or Jpanel in Swing or AWT?

D

dilip

hi friends ,
myself dilip,currently learning java. During practicals of java i got
confused because sir sometime use JFrame or sometimes Jpanel in Swing /
AWT .
What is basic difference between them.Please clarify when to use/not
use either of JFrame /Jpanel.
Dilip Kumar
http://www.intelcs.com/IT-Companies/
 
D

Daniel Pitts

hi friends ,
myself dilip,currently learning java. During practicals of java i got
confused because sir sometime use JFrame or sometimes Jpanel in Swing /
AWT .
What is basic difference between them.Please clarify when to use/not
use either of JFrame /Jpanel.
Dilip Kumarhttp://www.intelcs.com/IT-Companies/


JFrame represents an actual Window (Frame) on the desktop.
JPanel represents a container within some other Window, such as a
JFrame or JDialog.

AWT doesn't have JFrame or JPanel, they are specific to Swing. AWT
does have its own equivalent classes, but I would steer clear of them.
Swing is a lot easy to create useful applications in.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top