S
Scott Steiner
Hi,
I can't seem to set the background colour of a JFrame. When the Frame is
loaded then I see the correct colour for a split second but then it's
gone. Here is the very simple sample code, any help much appreciated:
import javax.swing.*;
import java.awt.*;
public class Test extends JFrame
{
public Test()
{
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setSize(500,500);
this.setBackground(Color.BLACK);
this.setVisible(true);
}
public static void main(String[] args)
{
new Test();
}
}
I can't seem to set the background colour of a JFrame. When the Frame is
loaded then I see the correct colour for a split second but then it's
gone. Here is the very simple sample code, any help much appreciated:
import javax.swing.*;
import java.awt.*;
public class Test extends JFrame
{
public Test()
{
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
this.setSize(500,500);
this.setBackground(Color.BLACK);
this.setVisible(true);
}
public static void main(String[] args)
{
new Test();
}
}