Components in second JFrame not showing up

前端 未结 2 1613
有刺的猬
有刺的猬 2021-01-27 18:24

i want to start another JFrame from pressing a button in a JFrame. But if I press the Button it shows the JFrame but not the Buttons and Sliders in it.

public c         


        
2条回答
  •  甜味超标
    2021-01-27 18:58

    Try with repaint() or revalidate() at the end of you constructor. And also try with calling setVisible(true) at the end.

提交回复
热议问题