Monday, January 9, 2012

Why does this line throw NullPointerException?

In Circle.java, you've declared gc as a Graphics object but you don't initialize it anywhere. So when you call gc.drawOval(), gc is still null.

0 comments:

Post a Comment