Duplicate :
|
FULL PRODUCT VERSION : java version "1.6.0_17" Java(TM) SE Runtime Environment (build 1.6.0_17-b04) Java HotSpot(TM) Client VM (build 14.3-b01, mixed mode, sharing) ADDITIONAL OS VERSION INFORMATION : Windows 7 Ultimate A DESCRIPTION OF THE PROBLEM : on a JMenuBar or JPopupMenu the highlighted item, if corresponds to a JMenu is overlaping its subsequent popup area. It happens just if the root JMenu is entirely contained by the JFrame client area. In the case a JMenu draws beyond the JFrame bounds the correspond submenu (JMenu) is not being overlaped by the caller highlighted item. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : class Form extends JFrame { public JFrame() { JMenuBar jmenubar = new JMenuBar(); this.getContentPane().add(jmenubar); JMenu menu = new JMenu("menu"); jmenubar.add(menu); JMenu submenu1 = new JMenu("level 1"); menu.add(submenu1); JMenuItem item = new JMenuItem("item"); submenu1.add(item); this.setSize(200,100); // rover to "item" and try the same with this.setSize(200,60); } EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - caller menu item highlight being overlaped by child submenu ACTUAL - menu item highlight overlaping a child submenu ERROR MESSAGES/STACK TRACES THAT OCCUR : no error message REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- class Form extends JFrame { public JFrame() { JMenuBar jmenubar = new JMenuBar(); this.getContentPane().add(jmenubar); JMenu menu = new JMenu("menu"); jmenubar.add(menu); JMenu submenu1 = new JMenu("level 1"); menu.add(submenu1); JMenuItem item = new JMenuItem("item"); submenu1.add(item); this.setSize(200,100); // rover to "item" and try the same with this.setSize(200,60); } } ---------- END SOURCE ---------- CUSTOMER SUBMITTED WORKAROUND : not found