My problem is i want to change the background of my GUI to a different color but when i use JFrame.setBackground(color.RED) it doesnt work any other ideas or solutions?
public static void Home()
{
frame.setVisible(false);
JPanel panel2 = new JPanel();
JFrame frame2 = new JFrame ();
frame2.setBackground(Color.RED);
panel2.setLayout(null);
frame2.setSize(1500,750);
frame2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame2.setVisible(true);
frame2.add(panel2);