-
Bug
-
Resolution: Duplicate
-
P3
-
6
-
generic
-
generic
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);
}
}
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);
}
}
- duplicates
-
JDK-4842599 REGRESSION: JPopupMenu not Hidden Properly After Iconified and Deiconified
- Closed
- relates to
-
JDK-4471924 Non-modal JDialog remains visible even after a call to setVisible(false).
- Closed