aspose file tools
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 OCA Java SE 8 Programmer I Study Guide 1Z0-808 this week in the OCAJP 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]
It is sorta covered in the JavaRanch Style Guide.
subject: paint(Graphics gr) returns nullpointerexception ?