This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
When using the 5.5RC1 IDE to set the background color property for a JSpinner swing object the following code is generated: jSpinner1.setBackground(new java.awt.Color(225, 238, 249)); This is incorrect, as JSpinner is a complex object and this tries to set the background color for the entire object. What is desired is to change the background of the textfield, creating instead the following code: ((JSpinner.NumberEditor)jSpinner1.getEditor()).getTextField().setBackground(new java.awt.Color(225, 238, 249)); Bryan
wrong component, reassigning
Exposing internals of JSpinner does not seem to be a good solution to me. We can't be sure what component is used as JSpinner's editor. Probably the same problem exists with JComboBox. These components are simply not very friendly to visual customization in GUI builders. I suggest to simply hide the JSpinner's and JComboBox's properties that does not makes sense to be set.
Fixed - background and foreground properties of JSpinner has been removed from Properties window of GUI Builder. Modified file: http://hg.netbeans.org/cdev/rev/482b54e55172