Meaningless Drivel is fun!
The moose likes Beginning Java and the fly likes paint(Graphics gr) returns nullpointerexception ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "paint(Graphics gr) returns nullpointerexception ?" Watch "paint(Graphics gr) returns nullpointerexception ?" New topic

paint(Graphics gr) returns nullpointerexception ?

achana chan
Ranch Hand

Joined: Jul 29, 2002
Posts: 277
I want to use the following codes to "paint" and image, and get a null pointer exception on my Java console.
Can someone please give me a hint what might have gone wrong ???

humanum errare est.
Dirk Schreckmann

Joined: Dec 10, 2001
Posts: 7023
Did the error message include any information on what part of the program may have caused the NullPointerException (such as a line number)?

[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
I agree. Here's the link:
subject: paint(Graphics gr) returns nullpointerexception ?
It's not a secret anymore!