L
lrantisi
I have the following code:
Graphics canvasGraphics
canvasGraphics.drawLine(x, y, 200, 200);
which works fine on a machine. But on another machine, I receive the
following 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(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
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
Graphics canvasGraphics
canvasGraphics.drawLine(x, y, 200, 200);
which works fine on a machine. But on another machine, I receive the
following 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(Unknown
Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown
Source)
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