Code:
import java.awt.Color;
 
import javax.swing.JApplet;
import javax.swing.JLabel;

 
public class  ForegroundColorEx  extends JApplet{
 
        public void init(){
               
       
           
            JLabel MyLbl = new JLabel(" Set Forground Color Example.");
                       
            
                /
                Color myclr = new Color(10,10,255);
               
                MyLbl.setForeground(myclr);
               
                add(MyLbl);
        }
}