Swing JPanel won't repaint

前端 未结 6 2228
傲寒
傲寒 2021-02-20 07:39

I have a simple object which extends JPanel, when the update() method is called on this object it it meant to add some labels to the panel and then rep

6条回答
  •  生来不讨喜
    2021-02-20 07:57

    The call to validate() should work, although revalidate() may be sufficient; repaint() should not be required. You might compare what you're doing to this example that does dynamic GridBagLayout.

提交回复
热议问题