个人认为没有办法,menubar是可以加在frame上,但是applet实际上是一个panel,无法加载menubar。

解决方案 »

  1.   

    The MenuBar class encapsulates the platform's concept of a menu bar bound to a frame. In order to associate the menu bar with a Frame object, call the frame's setMenuBar method.
      

  2.   

    JApplet就可以了!setJMenuBar(JMenuBar menuBar) 
      

  3.   

    楼上的对。不过楼主问的是applet和menubar
      

  4.   

    用JApplet代替,或自己继承Applet类并实现RootPaneContainer接口