For the Background, make sure you have imported java.awt.Color
into your package.
In your main
method, i.e. public static void main(String[] args)
, call the already imported method:
JLabel name_of_your_label=new JLabel("the title of your label");
name_of_your_label.setBackground(Color.the_color_you_wish);
name_of_your_label.setOpaque(true);
NB: Setting opaque will affect its visibility. Remember the case sensitivity in Java.