NullPointerException means you tried to do something with a variable that was null, i.e. not initialised. The full stack trace for the NullPointerException will tell you which line in the code it occurred.

As it happens, your problem is that in your TestPanelDrawing constructor, you add an anonymous NewPanel (with null array), then set the array into the class field NewPanel (which doesn't get used).