Hey guys I'm new to java and just self-teaching my self. If i wanna set
the background to a color of my choice, i need the rgb numbers. so i
got them but how can I put them in so its correct syntax?
here is what I have..
setBackground(Color(135,206,250));
i've tried many things and looked in jdk and just don't understand it.
If anyone can tell me that would be great. Its so easy i'll feel stupid
when you tell me. Thanks for your help.
>setBackground(Color(135,206,250));
you need setBackground(new Color(135,206,250));
or beter still:
private static final Color DARKTURQUOISE = new Color( 0x00ced1 );
setBackground( DARKTURQUOISE );
Or this way to make it easier to change the colour scheme:
// colours used
private static final Color DARKTURQUOISE = new Color( 0x00ced1 );
...
// colour scheme
public static final Color PANEL_BACKGROUND = DARKTURQUOISE;
...
setBackground( PANEL_BACKGROUND );

Signature
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.