so i know japplet, jframe, jdialog, jwindow, jpanel windows to create gui.
japplet = you use japplet for website with no resizeable or main buttons
jframe = ???
...
try to explain as much as you can. i want to know adv and dis of these window.
Printable View
so i know japplet, jframe, jdialog, jwindow, jpanel windows to create gui.
japplet = you use japplet for website with no resizeable or main buttons
jframe = ???
...
try to explain as much as you can. i want to know adv and dis of these window.
The classes named Jsomething (JApplet, JFrame, JButton, etc.) are part of the Swing windows toolkit. This is an java implementation layer on top of the AWT toolkit, which interfaces with the native operating system stuff (Applet, Frame, Window, etc.). Basically unless you have a good reason to use AWT, I would recommend sticking with Swing. There are also the SWT toolkit, but this is not part of the standard Java API. The main reason for using Swing is because it tends to fit better together with the rest of your Java program, has more features, and overall in my opinion is easier to use compared to AWT (I've never really used SWT so I don't have any opinion on it).
If at all possible don't mix and match components from different toolkits into the same GUI. Chances are your GUI won't quite turn out how you wanted it to without some finagling and poor hacks. Even though Swing is built on top of AWT, the main components between the two just don't fit together well in the same GUI.
There are a variety of resources online which explain the difference between the various components, so I'll just link to them and let you dive through the material.
Using Top-Level Containers (Swing)
How to Use Panels (Swing)
JFrame Javadoc
JWindow Javadoc
JPanel Javadoc