>> 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
[quoted text clipped - 10 lines]
>
> /Thomas
Thank you for the responses. Here's what I've done today. I wrote the
app - basically, JFrame, JPanel, 3 JSliders - pretty simple. I can
successfully show the color by moving the sliders - at first i didn't
know how to do that but i did some googling and that helped a lot. I
made an inner class ColorListener that implements the ChangeListener
class. I'll post the code later, i don't have it on this computer yet.
> 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);
That's exactly what I want to do. I want to add a little JTextArea and
print the color hex value in there. (The purpose is to make the app
useful for web page designing - get the color value easily).
> This sounds like a fun programming exercise even if there already is a
> really nice built in tool (JColorChooser) to do the job.
I'll look up the JColorChooser cuz I _have_ to be done by tomorrow with
the whole thing.
> Why don't you
> start writing it and post your progress and any question?
I'll see if I can really do the hex value computations. Maybe in a
couple of days I'll start working on it. As I said I'll go with the
JColorChooser for now since I want the program done by tomorrow.
Thanks again to everyone! I'll post a link to the final work so that you
can see it & try it if you want.
I'll be back.
Thomas A. Russ - 06 Feb 2004 21:12 GMT
> That's exactly what I want to do. I want to add a little JTextArea and
> print the color hex value in there. (The purpose is to make the app
> useful for web page designing - get the color value easily).
Well, if you really want to make it useful for web page designing, you
probably also will want to have the controls respect the so-called "Web
Safe" color constraints -- at least as an option.
That makes things a bit more difficult on the interface end, since you
would no longer be able to offer a complete continuum of input values.

Signature
Thomas A. Russ, USC/Information Sciences Institute
Andrew Thompson - 07 Feb 2004 06:13 GMT
>> That's exactly what I want to do. I want to add a little JTextArea
>> and print the color hex value in there. (The purpose is to make the
[quoted text clipped - 3 lines]
> probably also will want to have the controls respect the so-called
> "Web Safe" color constraints -- at least as an option.
I would not worry about that, a discussion
on c.i.w.a.stylesheets recently had all the
gurus rejecting the need for web-safe colors
out of hand.
--
Andrew Thompson
* http://www.PhySci.org/ Open-source software suite
* http://www.PhySci.org/codes/ Web & IT Help
* http://www.1point1C.org/ Science & Technology
> Thomas:
Yes?
> You will only need hex numbers if you want to display the color values
> in hex.
I? I don't need any hex numbers. I didn't ask that question.
> Why don't you
> start writing it and post your progress and any question?
Why? I didn't ask the question. Should I be in the need for a color
chooser I will use JColorChooser, as I have suggested to the original
poster.
/Thomas