I have a JFrame whose background color is black.
setBackground(Color.BLACK);
I used RigidArea as filter:
Component rigidArea = Box.createRigidArea(new Dimension(0, 20));
rigidArea.setBackground(Color.BLACK);
getContentPane().add(rigidArea);
But this doesn’t work, as the rigidArea’s color is not black. What’s wrong here?
have you tried setting the background of the JFrame’s content pane to black too?
getContentPane().setBackground(Color.BLACK);