1

I'm trying to draw a modified version of my GUI onto the Glasspane. My idea is to have a panel where I override the paint function, but when I trysomething like

glass = frame.getGlasspane();
glass.draw(g);

I get a Nullpointer Exception, even though I initialized the glasspane with frame.setGlasspane(new JPanel());

Thanks for your help

mKorbel
  • 109,525
  • 20
  • 134
  • 319
Dimitri
  • 165
  • 8

1 Answers1

1

please read How to Use Root Panes follows example, example about paint(Graphics g) or here

mKorbel
  • 109,525
  • 20
  • 134
  • 319