Reputation: 281
I'm looking for a way to store color skin options in a JComboBox
and let the user select one and click apply. This will change the color of the running windows(JFrame). Is this possible? I only wan't like 2 or 3 color options. Should I co with another approach?
EDIT:
I've got a it to work but now im stuck in another dilemma. The objects in the JComboBox
are namen java.awt.color[something something]
, I wan't to turn it in to color names. Im passing a Color Array
in to a JComboBox
.
Upvotes: 2
Views: 300
Reputation: 674
Think there is an solution here, except it is in a JList, but it should be a similar answer. http://java.sun.com/developer/technicalArticles/GUI/jlist/
Upvotes: 1
Reputation: 57421
I think this http://www.java2s.com/Code/Java/Swing-JFC/ColorComboBoxComboBoxEditorDemo.htm
Upvotes: 3