Solved

ComboBox with table of basic colors

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
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…
The viewer will learn how to implement Singleton Design Pattern in Java.

744 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

13 Experts available now in Live!

Get 1:1 Help Now