JButton not visible until mouseover

前端 未结 4 496
感情败类
感情败类 2021-01-13 21:18

I\'m creating a gui for my project. When the gui is first loaded only background is visible, so buttons are not visible, but when mouse over them, they are visible. What is

4条回答
  •  無奈伤痛
    2021-01-13 21:32

    Problem is with

     getContentPane().setLayout(null);
    

    remove it as you have already set the layout to a Border Layout and you will see all these buttons.

提交回复
热议问题