-
Bug
-
Resolution: Won't Fix
-
P5
-
None
-
1.2.0
-
None
-
sparc
-
solaris_2.6
swing JColorChooser setSelectionModel(ColorSelectionModel newModel) with
param newModel = null you can get unexpected exceptions thrown because the
selectionModel will be set to null. If the param is null the color selection model should be set to the DefaultColorSelectionModel not null.
In this situation when the ColorChooser comes up and you select something
in the dialog you get and exception thrown. Also using other methods that
use the ColorSelectionModel (ex: setColor(Color color)) you will get an exception thrown.
Exception Example 1:
Exception occurred during event dispatching:
java.lang.NullPointerException
at javax.swing.colorchooser.DefaultSwatchChooserPanel$MainSwatchListener.mousePressed(DefaultSwatchChooserPanel.java:143)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
at java.awt.Component.processMouseEvent(Compiled Code)
at java.awt.Component.processEvent(Compiled Code)
at java.awt.Container.processEvent(Compiled Code)
at java.awt.Component.dispatchEventImpl(Compiled Code)
at java.awt.Container.dispatchEventImpl(Compiled Code)
at java.awt.Component.dispatchEvent(Compiled Code)
at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled Code)
at java.awt.LightweightDispatcher.processMouseEvent(Compiled Code)
at java.awt.LightweightDispatcher.dispatchEvent(Compiled Code)
at java.awt.Container.dispatchEventImpl(Compiled Code)
at java.awt.Window.dispatchEventImpl(Compiled Code)
at java.awt.Component.dispatchEvent(Compiled Code)
at java.awt.EventQueue.dispatchEvent(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)
Exception Example 2:
java.lang.NullPointerException
at javax.swing.JColorChooser.setColor(JColorChooser.java:258)
param newModel = null you can get unexpected exceptions thrown because the
selectionModel will be set to null. If the param is null the color selection model should be set to the DefaultColorSelectionModel not null.
In this situation when the ColorChooser comes up and you select something
in the dialog you get and exception thrown. Also using other methods that
use the ColorSelectionModel (ex: setColor(Color color)) you will get an exception thrown.
Exception Example 1:
Exception occurred during event dispatching:
java.lang.NullPointerException
at javax.swing.colorchooser.DefaultSwatchChooserPanel$MainSwatchListener.mousePressed(DefaultSwatchChooserPanel.java:143)
at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:221)
at java.awt.Component.processMouseEvent(Compiled Code)
at java.awt.Component.processEvent(Compiled Code)
at java.awt.Container.processEvent(Compiled Code)
at java.awt.Component.dispatchEventImpl(Compiled Code)
at java.awt.Container.dispatchEventImpl(Compiled Code)
at java.awt.Component.dispatchEvent(Compiled Code)
at java.awt.LightweightDispatcher.retargetMouseEvent(Compiled Code)
at java.awt.LightweightDispatcher.processMouseEvent(Compiled Code)
at java.awt.LightweightDispatcher.dispatchEvent(Compiled Code)
at java.awt.Container.dispatchEventImpl(Compiled Code)
at java.awt.Window.dispatchEventImpl(Compiled Code)
at java.awt.Component.dispatchEvent(Compiled Code)
at java.awt.EventQueue.dispatchEvent(Compiled Code)
at java.awt.EventDispatchThread.run(Compiled Code)
Exception Example 2:
java.lang.NullPointerException
at javax.swing.JColorChooser.setColor(JColorChooser.java:258)
- relates to
-
JDK-4371409 TEST_BUG: the test JColorChooser/JCC_setSelectionModel is invalid
-
- Open
-