Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.gui > #1338 > unrolled thread

Error at drawing on the C

Started by"lrantisi" <lrantisi@THRWHITE.remove-dii-this>
First post2011-04-27 15:32 +0000
Last post2011-04-27 15:32 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.lang.java.gui


Contents

  Error at drawing on the C "lrantisi" <lrantisi@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000
    Re: Error at drawing on t "Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this> - 2011-04-27 15:32 +0000

#1338 — Error at drawing on the C

From"lrantisi" <lrantisi@THRWHITE.remove-dii-this>
Date2011-04-27 15:32 +0000
SubjectError at drawing on the C
Message-ID<1175391057.060376.127730@y80g2000hsf.googlegroups.com>
  To: comp.lang.java.gui
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

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [next] | [standalone]


#1341 — Re: Error at drawing on t

From"Knute Johnson" <knute.johnson@THRWHITE.remove-dii-this>
Date2011-04-27 15:32 +0000
SubjectRe: Error at drawing on t
Message-ID<2PEPh.290754$BK1.164128@newsfe13.lga>
In reply to#1338
  To: comp.lang.java.gui
lrantisi wrote:
> 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
> 

Because in line 82 of pan.java you have a reference variable that is null.

-- 

Knute Johnson
email s/nospam/knute/

---
 * Synchronet * The Whitehouse BBS --- whitehouse.hulds.com --- check it out free usenet!
--- Synchronet 3.15a-Win32 NewsLink 1.92
Time Warp of the Future BBS - telnet://time.synchro.net:24

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.gui


csiph-web