-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
5.0
-
x86
-
windows_2000
Name: gm110360 Date: 08/17/2004
FULL PRODUCT VERSION :
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)
ADDITIONAL OS VERSION INFORMATION :
windows 2000 5.00.2195 services pack4
A DESCRIPTION OF THE PROBLEM :
Put a JCombox in some container such as JFrame and set JFrame 's height a little more than JCombox height. You click JCombox and make it popup JPopupMenu, if PopupMenu's scope excesses JFrame's, here you minisize the JFrame and restore it, You can find that PopupMenu's scope shows incorrectly!
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. new JFrame object
2. put a JCombox in it
3.set JFrame Height a little more than JCombox's
4.click JCombox make that popup's scope excesses JFrame
5.minisize JFrame and restore Jframe
6.ok, You can find this bug
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
PopupMenu's scope shows incorrectly!
ACTUAL -
PopupMenu's scope shows incorrectly!
SOURCE CODE:
/*
* Created on 2004-8-10 22:46:02
*
* @(#)package swing.demo TestBug296377.java
*
* @Version 1.0
*
* Copyright (c) 2004 (liujin). All Rights Reserved.
*/
package swing.demo;
import javax.swing.JFrame;
import javax.swing.JComboBox;
import javax.swing.JPanel;
/**
* @author liujin
* @version1.0
*/
public class TestBug296377 extends JFrame {
private javax.swing.JPanel jContentPane = null;
private JComboBox jComboBox = null;
private JPanel jPanel = null;
public static void main(String[] args) {
TestBug296377 bug = new TestBug296377();
bug.show();
}
/**
* This is the default constructor
*/
public TestBug296377() {
super();
initialize();
}
/**
* This method initializes this
*
* @return void
*/
private void initialize() {
this.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE); // Generated
this.setTitle("Bug296377"); // Generated
this.setSize(300, 77);
this.setContentPane(getJContentPane());
}
/**
* This method initializes jContentPane
*
* @return javax.swing.JPanel
*/
private javax.swing.JPanel getJContentPane() {
if (jContentPane == null) {
jContentPane = new javax.swing.JPanel();
jContentPane.setLayout(new java.awt.BorderLayout());
jContentPane.add(getJPanel(), java.awt.BorderLayout.CENTER); // Generated
}
return jContentPane;
}
/**
* This method initializes jComboBox
*
* @return javax.swing.JComboBox
*/
private JComboBox getJComboBox() {
if (jComboBox == null) {
try {
jComboBox = new JComboBox();
jComboBox.setPreferredSize(new java.awt.Dimension(132, 27)); // Generated
} catch (java.lang.Throwable e) {
// TODO: Something
}
}
return jComboBox;
}
/**
* This method initializes jPanel
*
* @return javax.swing.JPanel
*/
private JPanel getJPanel() {
if (jPanel == null) {
try {
jPanel = new JPanel();
jPanel.add(getJComboBox(), null); // Generated
} catch (java.lang.Throwable e) {
// TODO: Something
}
}
return jPanel;
}
}
ERROR MESSAGES/STACK TRACES THAT OCCUR :
no stack traces
REPRODUCIBILITY :
This bug can be reproduced always.
(Incident Review ID: 296377)
======================================================================
- duplicates
-
JDK-4842599 REGRESSION: JPopupMenu not Hidden Properly After Iconified and Deiconified
- Closed