//import javax.swing.*;
//public class Main extends JFrame {
// public Main() {
// setTitle("300x300 스윙 프레임 만들기");
// setSize(300,300);
// setVisible(true);
// }
// public static void main(String[]args) {
// Main frame = new Main();
// }
//}
//import javax.swing.*;
//import java.awt.*;
//
//public class Main extends JFrame{
// public Main() {
// setTitle("ContentPane과 JFrame");
// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//
// Container contentPane = getContentPane();
// contentPane.setBackground(Color.BLUE);
// contentPane.setLayout(new FlowLayout());
//
// contentPane.add(new JButton("OK"));
// contentPane.add(new JButton("Cancel"));
// contentPane.add(new JButton("Ignore"));
//
// setSize(300,150);
// setVisible(true);
// }
// public static void main(String[]args) {
// new Main();
// }
//}
//import javax.swing.*;
//import java.awt.*;
//
//public class Main extends JFrame{
// public Main() {
// setTitle("FlowLayout Sample");
// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Container c = getContentPane();
//
// c.setLayout(new FlowLayout(FlowLayout.LEFT,30,40));
// c.add(new JButton("add"));
// c.add(new JButton("sub"));
// c.add(new JButton("mul"));
// c.add(new JButton("div"));
// c.add(new JButton("Calculate"));
//
// setSize(300,200);
// setVisible(true);
// }
// public static void main(String[] args) {
// new Main();
// }
//}
//import javax.swing.*;
//import java.awt.*;
//
//public class Main extends JFrame{
// public Main() {
// setTitle("BorderLayout Sample");
// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Container c = getContentPane();
//
// c.setLayout(new BorderLayout(30,20));
// c.add(new JButton("Calculate"), BorderLayout.CENTER);
// c.add(new JButton("add"), BorderLayout.NORTH);
// c.add(new JButton("sub"), BorderLayout.SOUTH);
// c.add(new JButton("mul"), BorderLayout.EAST);
// c.add(new JButton("div"), BorderLayout.WEST);
//
// setSize(300,200);
// setVisible(true);
// }
// public static void main(String[] args) {
// new Main();
// }
//}
//import javax.swing.*;
//import java.awt.*;
//
//public class Main extends JFrame{
// public Main() {
// setTitle("GridLayout Sample");
// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//
// GridLayout grid = new GridLayout(4,2);
// grid.setVgap(5);
//
// Container c = getContentPane();
// c.setLayout(grid);
// c.add(new JLabel(" 이름"));
// c.add(new JTextField(""));
// c.add(new JLabel(" 학번"));
// c.add(new JTextField(""));
// c.add(new JLabel(" 학과"));
// c.add(new JTextField(""));
// c.add(new JLabel(" 과목"));
// c.add(new JTextField(""));
//
// setSize(300,200);
// setVisible(true);
// }
// public static void main(String[] args) {
// new Main();
// }
//}
//import javax.swing.*;
//import java.awt.*;
//
//public class Main extends JFrame{
// public Main() {
// setTitle("Null Container Sample");
// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//
// Container c = getContentPane();
// c.setLayout(null);
//
// JLabel la = new JLabel("Hello, Press Buttons!");
// la.setLocation(130,50);
// la.setSize(200,20);
// c.add(la);
//
// for(int i = 1; i <= 9; i++) {
// JButton b = new JButton(Integer.toString(i));
// b.setLocation(i*15, i*15);
// b.setSize(50,20);
// c.add(b);
// }
// setSize(300,200);
// setVisible(true);
// }
// public static void main(String[]args) {
// new Main();
// }
//}
//import javax.swing.*;
//public class Main extends JFrame {
// public Main() {
// setTitle("Let's study Java");
// setSize(400,200);
// setVisible(true);
// }
// public static void main(String[]args) {
// Main frame = new Main();
// }
//}
//import javax.swing.*;
//import java.awt.*;
//
//public class Main extends JFrame{
// public Main() {
// setTitle("BorderLayout Sample");
// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
// Container c = getContentPane();
//
// c.setLayout(new BorderLayout(5,7));
// c.add(new JButton("Center"), BorderLayout.CENTER);
// c.add(new JButton("North"), BorderLayout.NORTH);
// c.add(new JButton("South"), BorderLayout.SOUTH);
// c.add(new JButton("East"), BorderLayout.EAST);
// c.add(new JButton("West"), BorderLayout.WEST);
//
// setSize(300,200);
// setVisible(true);
// }
// public static void main(String[] args) {
// new Main();
// }
//}
//import javax.swing.*;
//import java.awt.*;
//
//public class Main extends JFrame{
// public Main() {
// setTitle("GridLayout Sample");
// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//
// GridLayout grid = new GridLayout(1,10);
// grid.setVgap(5);
//
// Container c = getContentPane();
// c.setLayout(grid);
// for(int i = 0; i < 10; i++) {
// c.add(new JButton(""+i));
// }
//
// setSize(1000,600);
// setVisible(true);
// }
// public static void main(String[] args) {
// new Main();
// }
//}
//import javax.swing.*;
//import java.awt.*;
//
//public class Main extends JFrame{
// Main() {
// setTitle("GridLayout Sample");
// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//
// GridLayout grid = new GridLayout(1,10);
// grid.setVgap(5);
//
// Container c = getContentPane();
//
// c.setLayout(grid);
// JButton[] b=new JButton[10];
//
// for(int i = 0; i < 10; i++)
// {
// b[i]=new JButton(""+i);
// c.add(b[i]);
// }
// b[0].setBackground(Color.red);
// b[1].setBackground(Color.orange);
// b[2].setBackground(Color.yellow);
// b[3].setBackground(Color.green);
// b[4].setBackground(Color.cyan);
// b[5].setBackground(Color.blue);
// b[6].setBackground(Color.magenta);
// b[7].setBackground(Color.darkGray);
// b[8].setBackground(Color.pink);
// b[9].setBackground(Color.gray);
//
// setSize(1000,600);
// setVisible(true);
// }
// public static void main(String[] args) {
// new Main();
// }
//}
//import javax.swing.*;
//import java.awt.*;
//import java.util.Random;
//
//public class Main extends JFrame{
// public Main() {
// setTitle("4x4 Color Frame");
// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//
// GridLayout grid = new GridLayout(4,4);
// grid.setVgap(0);
//
// Container c = getContentPane();
//
// c.setLayout(grid);
// JButton[] b = new JButton[16];
// for(int i = 0; i < 16; i++) {
// b[i] = new JButton("" + i);
// c.add(b[i]);
// }
// for(int i = 0; i < 16; i++) {
// b[i].setBackground(new Color((int)(Math.random()*255),
// (int)(Math.random()*255), (int)(Math.random()*255)));
// }
// setSize(1000,600);
// setVisible(true);
// }
// public static void main(String[]args) {
// new Main();
// }
//}
//import javax.swing.*;
//import java.awt.*;
//
//public class Main extends JFrame{
// Main() {
//
// setTitle("Random Labels");
// setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
//
// Container c = getContentPane();
// c.setLayout(null);
//
// JLabel [] l = new JLabel[20];
// for(int i = 0; i < 20; i++) {
// int pt = (int)(Math.random()*200)+50;
// int pt1 = (int)(Math.random()*200)+50;
// l[i] = new JLabel(""+i);
// l[i].setLocation(pt, pt1);
// l[i].setSize(20,20);
// l[i].setBackground(Color.blue);
// l[i].setOpaque(true);
// c.add(l[i]);
// }
// setSize(300, 300);
// setVisible(true);
// }
// public static void main(String[]args) {
// new Main();
// }
//}