Re: color tool
From: Knute Johnson (nospam_at_sagebrush.frazmtn.com)
Date: 02/05/04
- Next message: Don Leckie: "Including fonts in application distribution"
- Previous message: Andrew Thompson: "Re: Swing accelerator keys"
- In reply to: Thomas Weidenfeller: "Re: color tool"
- Next in thread: The Chief: "Re: color tool"
- Reply: The Chief: "Re: color tool"
- Reply: Thomas Weidenfeller: "Re: color tool"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 05 Feb 2004 18:14:17 GMT
Thomas Weidenfeller wrote:
> The Chief wrote:
>
>> That's basically what I want to do. I hope the sketch above came out
>> well. Here's a description - just in case. I want to make a simple app
>> that will have three JSliders that will represent RGB (red, green,
>> blue). Also I want the hex value of the current color to be printed in
>> a text field or something like that (so that it could be easily
>> copied). Basically, I think i can do everything but I have no idea on
>> how to compute the HEX values of a color. Or how to "bind" the
>> JSliders with the hex value computing. I know this is actually the
>> whole program but any help would be greatly appreciated.
>
>
> You want to explore javax.swing.JColorChooser first, before running your
> own.
>
> /Thomas
>
Thomas:
You will only need hex numbers if you want to display the color values
in hex. It is very easy to convert an int to a hex string.
String Integer.toString(int i, int radix);
This sounds like a fun programming exercise even if there already is a
really nice built in tool (JColorChooser) to do the job. Why don't you
start writing it and post your progress and any question?
knute...
email s/nospam/knute/
- Next message: Don Leckie: "Including fonts in application distribution"
- Previous message: Andrew Thompson: "Re: Swing accelerator keys"
- In reply to: Thomas Weidenfeller: "Re: color tool"
- Next in thread: The Chief: "Re: color tool"
- Reply: The Chief: "Re: color tool"
- Reply: Thomas Weidenfeller: "Re: color tool"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|