Solved

ComboBox with table of basic colors

Posted on 2004-08-01
3
191 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
basic hardware to learn oop advanced design patterns 3 88
Java Message handling in Service Layer 3 57
eclipse java  build path 6 44
jar file executable 12 40
An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
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…
The viewer will learn how to implement Singleton Design Pattern in Java.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

910 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

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now