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



On Aug 31, 1:23 am, dilip <linkbuilder2...@xxxxxxxxx> wrote:
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.

.



Relevant Pages

  • Re: awt canvas on a swing form okay?
    ... >>1) i plan on having an awt canvas component on a JFrame ... >>with other swing components..will this be okay? ...
    (comp.lang.java.gui)
  • Re: awt canvas on a swing form okay?
    ... >>1) i plan on having an awt canvas component on a JFrame ... >>with other swing components..will this be okay? ...
    (comp.lang.java.programmer)
  • Re: awt canvas on a swing form okay?
    ... >>1) i plan on having an awt canvas component on a JFrame ... >>with other swing components..will this be okay? ...
    (comp.lang.java.help)
  • Re: awt canvas on a swing form okay?
    ... >>1) i plan on having an awt canvas component on a JFrame ... >>with other swing components..will this be okay? ...
    (comp.lang.java)
  • Re: what cant you do in swing but in awt?
    ... but using Swing and AWT components within the _same_ JFrame is ... can you make swing objects and awt objects work ... > like jpanel to containt awt buttons etc.. ...
    (comp.lang.java.programmer)