I have the following code:Graphics canvasGraphicscanvasGraphics.drawLine(x, y, 200, 200);which works fine on a machine. But on another machine, I receive thefollowing error messages.===============Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at pan$1.mouseClicked(pan.java:82) at java.awt.Component.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(UnknownSource) at java.awt.EventDispatchThread.pumpEventsForHierarchy(UnknownSource) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)+++++======================Why do I get this
|
|
0
|
|
|
|
Reply
|
lrantisi295 (30)
|
4/1/2007 1:31:23 AM |
|
On Apr 1, 11:31 am, "lrantisi" <lrant...@gmail.com> wrote:
> I have the following code:
>
> Graphics canvasGraphics
> canvasGraphics.drawLine(x, y, 200, 200);
That code does not compile.
> which works fine on a machine.
No it wouldn't. It would not even compile.
Please stop wasting your time, and our bandwdidth,
posting snippets of code that do not express the
problem.
I recommend you prepare an SSCCE that shows the
same behaviour, and post that instead.
<http://www.physci.org/codes/sscce.html>
Andrew T.
|
|
0
|
|
|
|
Reply
|
Andrew
|
4/1/2007 6:48:41 AM
|
|