Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 198
  • Last Modified:

ComboBox with table of basic colors

I would like to get a comboBox that when clicked brings up a table full of basic colors and a button at the bottom of it named "more colors"  that when clicked brings up a popup window. There is an example like it @:

http://www.codeproject.com/miscctrl/colour_picker.asp.
0
Drop_of_Rain
Asked:
Drop_of_Rain
1 Solution
 
JohnnyAffaCommented:
- create a class called ColorPicker that extends JDialog

- decide how many colors you want, this will determine how many panels to use to display you colors

- set the layount to gridlayout, the size of the grid should be the amount of colors you want

- if you know the colors you want, use an array of colors ie

   Color colors[] = {Color.red,Color.blue,Color.green............etc

   or you could use any number of the Color constructors to create any color you want



that should be enough to get you started
0
 
Drop_of_RainAuthor Commented:
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now