How to Earn Money ADFLY

Monday, 20 February 2017

Background Set Color Java Program

import java.awt.*;
import java.awt.event.*;
import javax.swing.*;

public class Simple extends JFrame{
public Simple(){
setBounds(0,0,600,400);
setTitle("Simple Java Program");
setVisible(true);

getContentPane().setBackground(Color.red);


}
public static void main(String args[]){
JFrame f=new Simple();
}
}

No comments:

Post a Comment