• Post Reply Bookmark Topic Watch Topic
  • New Topic

Menubar in applet possible?  RSS feed

 
Kavitha S
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is it possible to add a menubar to an applet? I see that there's no setMenuBar() method for an applet, it exists only for frames. Kindly help me
 
Ko Ko Naing
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Kavitha S:
Is it possible to add a menubar to an applet? I see that there's no setMenuBar() method for an applet, it exists only for frames. Kindly help me


Kavitha,
One alternative is to use JApplet, rather than its superclass Applet. You can setJMenuBar(JMenuBar menuBar) in that JApplet... But the only difference is that JApplet is in javax.swing package and its superclass Applet is in java.applet package...

Since JApplet is a subclass of that Applet, every operation available in Applet will be available in JApplet as well... Hope this helps...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!