This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
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

Win a copy of REST with Spring (video course) this week in the Spring forum!
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]
subject: paint(Graphics gr) returns nullpointerexception ?
It's not a secret anymore!