|
Re: Problem by resolving typs by HalloWorld [message #1435055 is a reply to message #1434763] |
Tue, 30 September 2014 21:04  |
Eclipse User |
|
|
|
Most likely you need to add the swt.jars in your projects build path.
Tom
On 30.09.14 10:10, Franz Raaber wrote:
> After mine starting with Java, did I have by the Realisation of "HelloWorld.java" treyed to realise "HelloWorldSWT". But this Windows Version of HelloWorld [
> public class HelloWorldSWT {
>
> public static void main(String[] args) {
> // TODO Auto-generated method stub
> Display display = new Display();
> Shell shell = new Shell(display);
> shell.setText("Hello world!");
> shell.open();
> while(!shell.isDisposed()) {
> if(!display.readAndDispatch())
> display.sleep();
> }
> display.dispose();
> }
>
> }
> ] didn't be compiled or interpreted in mine sense.
> I get in the line "Display display = new Display();" the message/errore "Display can not resolved to a type", and in the "Shell shell = new Shell(display);"-line the errore "Shell shell = new Shell(display);" in the similar way!
> What do I've to do? What is wrong?
> I think and thought that the problem the missing definition of the variables "Display" and "Shell" is, but is that realy the fact, by the reason that I found these code on a book and a popluar web-page?
>
> Cu
> Franz :(
>
|
|
|
Powered by
FUDForum. Page generated in 0.05816 seconds