I am trying to create an object of the class Color in awt to add it to the background of my JFrame ..but JCreator keep giving me this error message : .java:23: error: cannot find symbol getContentPane().setBackground(Color.color); ^ symbol: variable color location: class Color 1 error
even when I am importing the Color class ... here is part of my code:
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JButton;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.ImageIcon;
import java.awt.event.*;
import javax.swing.BorderFactory;
import java.awt.Font;
import java.awt.Color;
public class myframe extends JFrame implements ActionListener
{
public myframe()
{
setLayout(null);
Color color = new Color(135,206,235);
// Color skyblue = new Color((float)135,(float)206,(float)235);
getContentPane().setBackground(Color.color);
ImageIcon icon = new ImageIcon("horizntal logo.gif");
setIconImage(icon.getImage());