Solved

ComboBox with table of basic colors

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
How to parse custom JSON to POJO java 4 72
how to add new optional parameter to JSP 1 40
java jdbc batch example 8 29
tomcat startup error 5 59
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
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 …

816 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

7 Experts available now in Live!

Get 1:1 Help Now