-
Bug
-
Resolution: Unresolved
-
P4
-
openjdk8u
-
x86_64
-
linux_redhat_6.0
ADDITIONAL SYSTEM INFORMATION :
RHEL kernel 3.10.0-1127.el7.x86_64
OpenJDK 1.8.0_262
OpenJDK Runtime Environment 1.8.0_262-b10
icewm 2.9.8
A DESCRIPTION OF THE PROBLEM :
Under icewm, after a window containing a JComboBox is resized in a manner that decreases the x coordinate of the JComboBox the JComboBox will open and then immediately close when clicked. Under gnome, the JComboBox menu will stay open after the resize when clicked.
If the window is then dragged to a new location, the JComboBox will begin functioning normally when clicked.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run test application provided under icewm window manager
2. Resize the window to be larger by any of the following methods:
a. Drag left edge to the left
b. Drag top edge up
c. Drag upper left corner up and/or left
3. Click JComboBox - box will open and then immediately close
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
JComboBox should always remain open after a single click
ACTUAL -
JComboBox opens and then closes immediately after a single click following a resize by dragging upper left corner up and/or left
---------- BEGIN SOURCE ----------
import java.awt.Dimension;
import java.awt.BorderLayout;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
public class JComboBoxClickTest {
public static void main(String[] args) {
String [] comboItems = new String [] {"1", "2", "3"};
JFrame frame = new JFrame();
frame.setTitle("JComboBox click test");
frame.setLayout( new BorderLayout( ) );
JPanel panel = new JPanel( new GridBagLayout( ) );
GridBagConstraints gbc = new GridBagConstraints( );
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.fill = GridBagConstraints.BOTH;
gbc.gridwidth = 1;
gbc.gridy = 0;
gbc.weighty = 0;
gbc.gridx = 0;
gbc.weightx = 1;
JLabel label = new JLabel( "Pick one: " );
panel.add( label, gbc );
JComboBox combo = new JComboBox(comboItems);
combo.setEditable(false);
combo.setPreferredSize( new Dimension(100, 50));
gbc.gridx = 1;
gbc.weightx = .5;
panel.add( combo, gbc );
frame.add( panel, BorderLayout.CENTER );
frame.setLocationRelativeTo( null );
frame.pack();
frame.setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Move window by dragging title bar. This will restore normal JComboBox functionality.
FREQUENCY : always
RHEL kernel 3.10.0-1127.el7.x86_64
OpenJDK 1.8.0_262
OpenJDK Runtime Environment 1.8.0_262-b10
icewm 2.9.8
A DESCRIPTION OF THE PROBLEM :
Under icewm, after a window containing a JComboBox is resized in a manner that decreases the x coordinate of the JComboBox the JComboBox will open and then immediately close when clicked. Under gnome, the JComboBox menu will stay open after the resize when clicked.
If the window is then dragged to a new location, the JComboBox will begin functioning normally when clicked.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Run test application provided under icewm window manager
2. Resize the window to be larger by any of the following methods:
a. Drag left edge to the left
b. Drag top edge up
c. Drag upper left corner up and/or left
3. Click JComboBox - box will open and then immediately close
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
JComboBox should always remain open after a single click
ACTUAL -
JComboBox opens and then closes immediately after a single click following a resize by dragging upper left corner up and/or left
---------- BEGIN SOURCE ----------
import java.awt.Dimension;
import java.awt.BorderLayout;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
public class JComboBoxClickTest {
public static void main(String[] args) {
String [] comboItems = new String [] {"1", "2", "3"};
JFrame frame = new JFrame();
frame.setTitle("JComboBox click test");
frame.setLayout( new BorderLayout( ) );
JPanel panel = new JPanel( new GridBagLayout( ) );
GridBagConstraints gbc = new GridBagConstraints( );
gbc.anchor = GridBagConstraints.NORTHWEST;
gbc.fill = GridBagConstraints.BOTH;
gbc.gridwidth = 1;
gbc.gridy = 0;
gbc.weighty = 0;
gbc.gridx = 0;
gbc.weightx = 1;
JLabel label = new JLabel( "Pick one: " );
panel.add( label, gbc );
JComboBox combo = new JComboBox(comboItems);
combo.setEditable(false);
combo.setPreferredSize( new Dimension(100, 50));
gbc.gridx = 1;
gbc.weightx = .5;
panel.add( combo, gbc );
frame.add( panel, BorderLayout.CENTER );
frame.setLocationRelativeTo( null );
frame.pack();
frame.setVisible(true);
}
}
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
Move window by dragging title bar. This will restore normal JComboBox functionality.
FREQUENCY : always