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

Empty popup shown after minimizing a frame

XMLWordPrintable

      FULL PRODUCT VERSION :
      java version "1.5.0-beta2"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b44)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP

      A DESCRIPTION OF THE PROBLEM :
      When popup menu is shown and frame is minimized and than maximized again,
      an empty popup is incorrectly shown

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. Run the test
      2. Click on the menu item
      3. Minimize and maximize the frame

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      No popups are shown after maximizing
      ACTUAL -
      An empty popup is shown

      REPRODUCIBILITY :
      This bug can be reproduced always.

      public class PopupTest {
          public static void main(String[] args) {
              final JFrame frame = new JFrame();
              frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
              JPanel jpanel = new JPanel();
              jpanel.setLayout(null);
              jpanel.setBackground(new Color(100, 100, 255));
              JMenuBar jmenubar = new JMenuBar();
              jmenubar.setVisible(true);
              jmenubar.setBounds(0, 0, 200, 20);
              JMenu jmenu = new JMenu();
              jmenu.setText("Click me");
              JMenuItem jmenuitem = new JMenuItem();
              jmenuitem.setText("Don't clickme. You should minimize shell.");
              jmenu.add(jmenuitem);
              jmenubar.add(jmenu);
              jpanel.add(jmenubar);
              frame.add(jpanel);
              frame.setSize(200, 200);
              frame.setVisible(true);
          }
      }

            alexp Alexander Potochkin (Inactive)
            alexp Alexander Potochkin (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: