Solved

ComboBox with table of basic colors

Posted on 2004-08-01
3
193 Views
Last Modified: 2010-03-31
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
Comment
Question by:Drop_of_Rain
3 Comments
 
LVL 3

Accepted Solution

by:
JohnnyAffa earned 500 total points
ID: 11692145
- 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
 

Author Comment

by:Drop_of_Rain
ID: 11883009
Thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This video teaches viewers about errors in exception handling.

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question