newbie: very simple problem strange error [message #167628] |
Sun, 27 August 2006 22:29  |
Eclipse User |
|
|
|
Originally posted by: go.away.com
hi-
i keep getting this message when i use shell
Syntax error on token";",{ expected after this token.
the error is on line 15.
i had such good productivity and than this.
any help figuring out why i am getting this syntax error
is a huge help.
thanks,
jim
package bcalc;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.SWT;
public class Foo {
public static void main(String args[]) {
Shell shell2 = new Shell();
VendorListViewer vendorListViewer = new
VendorListViewer("bb",shell2,SWT.V_SCROLL);
}
Display display = new Display();
final Shell shell = new Shell(display); //error on this line
/**
* @param args
*/
while(!shell.isDisposed()){
if (!display.readAndDispatch()){
display.sleep();
}
}
display.dispose();
}
}
|
|
|
|
|
|
|
|
Re: newbie: very simple problem strange error [message #167972 is a reply to message #167628] |
Tue, 29 August 2006 00:37  |
Eclipse User |
|
|
|
Originally posted by: wayne.beaton._NOSPAM_eclipse.org
3rdshiftcoder wrote:
> hi-
> i keep getting this message when i use shell
> Syntax error on token";",{ expected after this token.
> the error is on line 15.
> i had such good productivity and than this.
>
> any help figuring out why i am getting this syntax error
> is a huge help.
>
> thanks,
> jim
>
>
> package bcalc;
>
> import org.eclipse.swt.widgets.Shell;
> import org.eclipse.swt.widgets.Display;
> import org.eclipse.swt.SWT;
> public class Foo {
>
> public static void main(String args[]) {
>
> Shell shell2 = new Shell();
> VendorListViewer vendorListViewer = new
> VendorListViewer("bb",shell2,SWT.V_SCROLL);
> }
>
> Display display = new Display();
> final Shell shell = new Shell(display); //error on this line
> /**
> * @param args
> */
> while(!shell.isDisposed()){
> if (!display.readAndDispatch()){
> display.sleep();
>
> }
> }
> display.dispose();
>
> }
> }
Do you really mean to have the close curly-brace on line 12?
Wayne
|
|
|
Powered by
FUDForum. Page generated in 0.08112 seconds