JDK-6605941 : Nimbus L&F:Regression:PIT: Editable JComboBox Popup is 1 to 2 pixel wider than JComboBox textfield
  • Type: Bug
  • Component: client-libs
  • Sub-Component: javax.swing
  • Affected Version: 6u5
  • Priority: P3
  • Status: Closed
  • Resolution: Cannot Reproduce
  • OS: windows_vista
  • CPU: x86
  • Submitted: 2007-09-18
  • Updated: 2011-02-16
  • Resolved: 2007-11-30
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6u10Resolved
Related Reports
Relates :  
Description
Editable JComboBox Popup is 1 to 2 pixel wider than JComboBox textfield. This can be observed only in pit build. It looks fine 6u5_b03 promoted build. Hence  its a regression . I have attached screen shot of the same. The bug is reproduced in all platform. 

Step to reproduced.
------------------
1) Run the testcase.
2) Click on the arrow button of the editable comboBox & observe that popup is wider than the textfield. If you see the same then the bug is reproduced. 


source begin
-------------------
import javax.swing.JFrame;
import javax.swing.JComboBox;

public class NimusPITBuildJComobBoxBus {
	private JFrame frame=null;
	private JComboBox comboBox=null;

	NimusPITBuildJComobBoxBus(){
		frame = new JFrame();
		frame.setLayout(new java.awt.FlowLayout());
		comboBox = new JComboBox();
		comboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "NimbusLAFItem 1", "NimbusLAFItem 2", "NimbusLAFItem 3", "NimbusLAFItem 4", "NimbusLAFItem 5", "NimbusLAFItem 6", "NimbusLAFItem 7", "NimbusLAFItem 8", "NimbusLAFItem 9", "NimbusLAFItem 10" }));
		comboBox.setEditable(true);
		frame.add(comboBox);
		frame.pack();
		frame.setVisible(true);
	}

	public static void main(String []args){
		javax.swing.SwingUtilities.invokeLater(new Runnable(){
			public void run(){
				new NimusPITBuildJComobBoxBus();
			}
		});
	}
}
-------------------
source end

Comments
EVALUATION This has been fixed at some point, it is now correct
30-11-2007

EVALUATION It looks like we should add an Insets property to SynthComboBoxUI, allowing developers/designers to specify insets for the popup. These insets would be used to modify the shape/location of the popup relative to the combo box.
20-09-2007

EVALUATION I think we need to fix this, it is because we have extra space around the border for the focus. We need to add a property to move the popup, up 2px and move the left and right in 2px.
18-09-2007