| Author |
JColorChooser white doesn't fire event
|
Con Lu
Ranch Hand
Joined: Aug 27, 2002
Posts: 38
|
|
I have been using a JColorChooser dialog which sets the colors of a graph. It seems to work except when choosing the color white. Debugging code to console shows that when choosing white, ChangeEvents aren't fired, unlike other colors. Any help would be much appreciated,
|
 |
Nathan Pruett
Bartender
Joined: Oct 18, 2000
Posts: 4121
|
|
That's because white is the color that is initially selected and ChangeEvents are fired only when the selection changes. If white is already selected and you select it again, the selection does not change. Make sure you initialize the default color of the JColorChooser to the color of the component you are trying to change, something like : Then the JColorChooser and the Graph will be synched up.
|
-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
|
 |
 |
|
|
subject: JColorChooser white doesn't fire event
|
|
|