| Author |
Anyone know much about JColorChoosers?
|
J Ellis
Greenhorn
Joined: Aug 23, 2009
Posts: 27
|
|
I have a JColorChooser in my application; I cannot use the showDialog() method, so I have it added to a normal JPanel. The API documentation says that the JColorChooser has 3 APIs, including:
The ability to create instances of JColorChooser panes directly (within any container). PropertyChange listeners can be added to detect when the current "color" property changes.
However, I added a PropertyChangeListener and it does not fire when a new color is picked on the Color Chooser; it only fires once when the chooser opens and once when it closes (for the first one the e.getNewValue() is a JPanel, for the second it is null). I have been able to add a ChangeListener to the color chooser's SelectionModel, and THAT fires every time a new color is chosen, so at that point I just check the chooser's color, but why doesn't the API work like it's supposed to?
-TennSeven
|
 |
Darryl Burke
Bartender
Joined: May 03, 2008
Posts: 4202
|
|
You're right. Nowhere does the JColorChooser fire a property change "color"
You could search the bugbase to see if this has already been reported, and if not, file a bug report.
|
luck, db
There are no new questions, but there may be new answers.
|
 |
 |
|
|
subject: Anyone know much about JColorChoosers?
|
|
|