Issue Details (XML | Word | Printable)

Key: SWINGX-1356
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Critical Critical
Assignee: Karl Schaefer
Reporter: kleopatra
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
swingx

JXComboBox: throw NPE on toggling LAF

Created: 15/Oct/10 06:48 AM   Updated: 28/Jan/11 01:08 PM   Resolved: 19/Nov/10 09:33 AM
Component/s: Misc Component
Affects Version/s: 1.6.2
Fix Version/s: 1.6.3

Time Tracking:
Not Specified

Environment:

Operating System: All
Platform: All


Issuezilla Id: 1,356
Tags:
Participants: Karl Schaefer and kleopatra


 Description  « Hide

(don't know since when - reporting from Eclipse-Mylyn, where most current version is 1.6.1++
which probably needs updating, either locally only or in the tracker)

or fails silently - f.i. arrowbutton not showing

to reproduce NPE, run JXComboBoxVisualCheck and toggle LAF

start of stacktrace (when starting with metal, toggle to motif, f.i.)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.sun.java.swing.plaf.motif.MotifComboBoxUI.iconAreaWidth(MotifComboBoxUI.java:228)
at com.sun.java.swing.plaf.motif.MotifComboBoxUI.rectangleForCurrentValue(MotifComboBoxUI.java:211)
at com.sun.java.swing.plaf.motif.MotifComboBoxUI.paint(MotifComboBoxUI.java:128)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
at javax.swing.JComponent.paintComponent(JComponent.java:752)
at javax.swing.JComponent.paint(JComponent.java:1029)



Karl Schaefer added a comment - 19/Nov/10 09:33 AM

Issue 1356: Ensure that the we do not query the UI delegate during update.
Prevents the NPE, which was caused because we accessed the UI delegate during
update prior to complete configuration of the delegate.

swingx-core/src/main/java/org/jdesktop/swingx/JXComboBox.java

Committed revision 3890.