import java.awt.Color;
import javax.swing.JApplet;
import javax.swing.JLabel;
public class Main {
//from ww w.21 d o c . n et
public void init(){
JLabel label1 = new JLabel("JLabel Set Background Color Example.");
Color customColor = new Color(10,10,255);
label1.setOpaque(true);
label1.setBackground(customColor);
}
}