Change JLabel background color

From CodeCodex

Implementations[edit]

Java[edit]

The JLabel background is transparent by default, so changing the background color doesn't seem to do anything. Do something like this :

aJLabel.setOpaque(true);
aJLabel.setBackground(myColor)