[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Newbie: Help SWT error

Why don't you debug it and find out exactly what is null?

"Roland" <Roland.Goecke@xxxxxxxxxxxxxxxxxx> wrote in message
news:bejncm$una$1@xxxxxxxxxxxxxx
> This is probably a dumb mistake but given that I have now spent hours
> trying to fix it, I am at my wits end.
>
> I am using Eclipse 2.1 on Win2000 with Sun SDK 1.4.1_02.
>
> I am trying to write a program similar to the SWT examples file
> 'ImageAnalyzer' which I can compile and run without problems.
>
> I cut and paste some parts into my program and it compiles without error.
> However, when I try to run it, I get the following error message:
>
> java.lang.IllegalArgumentException: Argument cannot be null
> at org.eclipse.swt.SWT.error(SWT.java:2318)
> at org.eclipse.swt.SWT.error(SWT.java:2262)
> at org.eclipse.swt.graphics.GC.<init>(GC.java:72)
> at ENoteGUI.ENoteGUI.open(ENoteGUI.java:115)
> at ENoteGUI.ENoteGUI.Init(ENoteGUI.java:57)
> at ENoteImageAnalyser.<init>(ENoteImageAnalyser.java:29)
> at ENoteImageAnalyser.main(ENoteImageAnalyser.java:34)
> Exception in thread "main"
>
> What does it mean? I copied the same directories into the classpath and
> library path variables in the 'Run...' dialog that I find in the SWT
> examples, in particular the swt.jar and the directory that contains the
> swt-win32-2133.dll file.
>
> Any help would be much appreciated!
>
> Roland
>