简体   繁体   中英

How to show a textbox, button, etc in a Java Applet?

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?

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.

JAppletJFrame都扩展了Container ,因此您只需像在其他任何Swing GUI中一样设置布局添加组件即可。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM