-1

the pink color don't work!

//Frame

JFrame f = new JFrame("Tab");

f.setBounds(100, 100, 1000, 1000);

f.setVisible(true);

f.setLayout(null);

f.setBackground(Color.pink);

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433

1 Answers1

0

You need to use the content panel instead. Just substitute

f.getContentPane().setBackground(Color.pink);

instead of

f.setBackground(Color.pink);