0

I have a JCheckBox on top of an image, but whenever repaint() is called the JCheckBox disappears. If I click on the position where it initially was it becomes visible again. I've tried setting it to setVisible(true) on every repaint but that didn't work.

Does anyone know how I can fix this?

Maroun
  • 94,125
  • 30
  • 188
  • 241
Rene Roosen
  • 168
  • 1
  • 6
  • You probably need to call repaint on the checkbox as well. – svz Apr 21 '13 at 20:49
  • @svz Post it as an answer so he can accept it. – Maroun Apr 21 '13 at 21:07
  • Something else is wrong. You should not need to call repaint on a component added to a panel. Swing should do this automatically. There is a design problem somewhere. – camickr Apr 21 '13 at 21:19

0 Answers0