- Joined
- Jan 4, 2011
- Messages
- 1
- Reaction score
- 0
Hi, my problem is i'm trying to get a custom background for my frame, everything else works with my program and i tried a bunch of different methods but none seem to work. This is the part of my program that displays the first button and i got a custom background color, so can anyone tell me wat i should add.
import javax.swing.*;
import java.awt.*;
import javax.swing.JFrame;
public class ISU{
public static void main(String[] args){
Button1 go = new Button1();
go.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
go.setSize(280,190);
go.getContentPane().setBackground(Color.BLACK);//part i need to change
go.setVisible(true);
}
}
:withstup:
import javax.swing.*;
import java.awt.*;
import javax.swing.JFrame;
public class ISU{
public static void main(String[] args){
Button1 go = new Button1();
go.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
go.setSize(280,190);
go.getContentPane().setBackground(Color.BLACK);//part i need to change
go.setVisible(true);
}
}
:withstup: