import java.awt.*;
import javax.swing.*;
public class SimpleFrame2 {
public static void main(String[] args) {
JFrame frame = new JFrame();
frame.setBackground(Color.RED);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setLocation(new Point(10, 50));
frame.setSize(new Dimension(300, 300));
frame.setTitle("A frame");
frame.setVisible(true);
}
}
Friday, 26 January 2018
Related Posts:
Swing examples in javaimport java.awt.*;import java.awt.event.*;import javax.swing.*;import … Read More
JFrame example in java import java.awt.*;import javax.swing.*;public class JFrameExample {&nb… Read More
Action listner and area in javaimport javax.swing.*;import java.awt.*;import java.awt.event.*;public … Read More
ActionListner In java import java.awt.event.ActionEvent;import java.awt.event.ActionListener… Read More
0 comments: