How can I show common GUI elements such as :
- Textbox
- Button
- Radios/Dropdowns
- Labels
etc in a java applet which would be run from a web browser?
How can I show common GUI elements such as :
etc in a java applet which would be run from a web browser?
This applet tutorial starts from the beginning, and covers GUI components.
There are plenty of other applet tutorials around of course, almost all of which will cover GUI work.
Do you really need it to be an applet? Laying out a nice GUI with a java applet and swing is a pain, and javascript has advanced dramatically in speed and compatibility since the early years. There are very few reasons an actual java applet is needed anymore.
JApplet
and JFrame
both extend Container
, so you just set the layout and add the components like you would in any other Swing GUI.