*********************************************
COMPLETE SOURCE CODE FOR : ChangeJFrameBackgroundColour.java
*********************************************
import javax.swing.JFrame;
import javax.swing.JPanel;
import java.awt.Color;
public class ChangeJFrameBackgroundColour
{
public static void main(String[]args)
{
JFrame a=new JFrame("CHANGE BACKGROUND COLOUR");
//Now we will try change it's value
Color b=new Color(120,255,0);
JPanel c=new JPanel();
c.setBackground(b);
a.add(c);
a.setSize(600,200);
a.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
a.setVisible(true);
//I hope you enjoy
//Bye
}
}
*********************************************
JUST COMPILE AND EXECUTE IT
*********************************************