new Color Class problem [message #73607] |
Sat, 04 June 2005 11:06  |
Eclipse User |
|
|
|
Originally posted by: farocena.gmail.com
when I want to set the background color of a label:
label.setBackground(new Color(display,200,111,50));
I get this compilation error:
Exception in thread "main" java.lang.Error: Unresolved compilation
problem:
Color cannot be resolved to a type
at SWTHallo.main(SWTHallo.java:31)
Any clues?
Thanks in advance,
Fabián
|
|
|
Re: new Color Class problem [message #74787 is a reply to message #73607] |
Tue, 07 June 2005 03:32  |
Eclipse User |
|
|
|
Originally posted by: dyd_666_81-eclipsenews.yahoo.it
Fabián ha scritto:
> when I want to set the background color of a label:
>
> label.setBackground(new Color(display,200,111,50));
>
> I get this compilation error:
> Exception in thread "main" java.lang.Error: Unresolved compilation
> problem: Color cannot be resolved to a type
>
> at SWTHallo.main(SWTHallo.java:31)
>
> Any clues?
> Thanks in advance,
> Fabián
>
>
I hope you have imported this...
import java.awt.Color;
If so, check the properties of your project: Java Build Path - Libraries
should contain a library with java.awt.Color.class (usually, it is in
rt.jar inside JRE System Library).
|
|
|
Powered by
FUDForum. Page generated in 0.07710 seconds