I’m having this issue with Firefox 12.0 on Mac OS X 10.7.4 using the following code:
import javax.swing.*; public class AppletWithMenuBar extends JApplet { public void init() { JMenuBar menuBar = new JMenuBar(); JMenu fileMenu = menuBar.add(new JMenu("File")); fileMenu.add(new JMenuItem("New")); fileMenu.add(new JMenuItem("Open")); fileMenu.add(new JMenuItem("Save")); JMenu editMenu = menuBar.add(new JMenu("Edit")); editMenu.add(new JMenuItem("Cut")); editMenu.add(new JMenuItem("Copy")); editMenu.add(new JMenuItem("Paste")); setJMenuBar(menuBar); } }
and
<applet code="AppletWithMenuBar.class" width="400" height="100"></applet>
Whenever I select an item from the “Edit” menu the “File” menu gets highlighted.
Check it out for yourself here or have a look at the videos below.
This issue is also discussed here.