Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Can you add a menu to an applet?  RSS feed

 
Richard Mackney
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I'm a part time Java Lecturer, I'm SCJP, SCWCD qualified but unable to do the above!!
Its causing me a little embarrassment because it is part of an assignment my students are doing! Can someone tell me if it is possible, and if so, How?
Thanks very much
Richard Mackney
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only way (that I know...) to show a realMenuBar in an Applet(AWT) is to launch a Frame from the Applet and show the MenuBar on it. If you are using a JApplet(Swing) you can add a JMenuBar directly to it.

You can also "fake" the functionality of a MenuBar in an AWT Applet by using PopupMenus... the following code illustrates the use of PopupMenus in an Applet:
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!