Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6921684

JMenu's highlithed JMenuItem is overlaping child submenu

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 6u10
    • Fix Version/s: None
    • Component/s: client-libs
    • Labels:

      Description

      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

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              alexp Alexander Potochkin (Inactive)
              Reporter:
              igor Igor Nekrestyanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: