-
Bug
-
Resolution: Cannot Reproduce
-
P4
-
None
-
1.4.0, 1.4.2
-
x86
-
windows_nt, windows_2000
Name: rmT116609 Date: 08/28/2001
java version "1.4.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta2-b77)
Java HotSpot(TM) Client VM (build 1.4.0-beta2-b77, mixed mode)
Please run the following program:
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
public class JComboBoxBug
{
static JDialog dialog=new JDialog();
static JLabel infoLabel=new JLabel();
public static void main (String args[])
{
dialog.setTitle("JComboBoxBug");
dialog.setModal(true);
JComboBox box=new JComboBox();
for(int i=1;i<5;i++)
{
// add some entries
box.addItem("Entry "+i);
}
Container cont=dialog.getContentPane();
cont.setLayout(new BorderLayout());
JPanel centerPanel=new JPanel();
JPanel southPanel=new JPanel();
JButton okButton=new JButton("OK");
centerPanel.add(infoLabel);
centerPanel.add(box);
southPanel.add(okButton);
okButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent evt)
{
dialog.hide();
}
});
cont.add(BorderLayout.CENTER, centerPanel);
cont.add(BorderLayout.SOUTH, southPanel);
infoLabel.setText("Please select something using your mouse and then click ok.");
dialog.pack();
dialog.show();
infoLabel.setText("Now try selecting something different with your mouse again. It won't work in JDK 1.4 Beta1/2 (regression). JDK 1.3.1 works fine. Key-Selection still works.");
dialog.pack();
dialog.show();
System.exit(0);
}
}
The used JComboBox can't be selected with the mouse anymore when the modal
dialog is displayed for the second time. Keyboard-Selection (Cursor-up/down)
still works as expected.
This is a regression from jdk1.3.1 where this code works without problems.
(Review ID: 130838)
======================================================================
- duplicates
-
JDK-4993137 JComboBox popup loses mouse events in nested modal dialog on repeated use.
-
- Closed
-
- relates to
-
JDK-4492892 REGRESSION: windows l&f: mnemonics do not work in menus
-
- Closed
-