JButton not visible until mouseover
问题 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 the solve this problem? public class Home extends JFrame{ //New JPanel private JPanel home; //Creating image url. You must be change url ImageIcon icon = new ImageIcon("img//home1.jpeg"); //Home Class public Home(){ setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setBounds(100, 100, 960, 640); setTitle("LoneyTunes Crush");