NullPointerException

Started by
9 comments, last by Eckhart 12 years, 3 months ago

Because if you call it in your main method the Graphics object from the GUI might not be initialized yet. You've created a race situation because your main method is in one thread and the GUI (i assume it's a JFrame or something) runs in the GUI thread.

Thanks, I think that's why.

This topic is closed to new replies.

Advertisement