/*class Main{
public static void main(String[] args) {
Main p = new Main();
p.move(10,10);
System.out.println(p.toString()+"입니다.");
}
}
*/
/*
import java.awt.Container;
import javax.swing.*;
class MyPanel extends JPanel{
}
public class Main extends JFrame{
public Main() {
super("타이틀 문자열");
setTitle("타이틀 문자열");
Container contentPane = getContentPane();
setSize(300,300);
setVisible(true);
JButton button = new JButton("Click");
contentPane.add(button);
}
public static void main(String[] args) {
Main frame = new Main();
frame.setContentPane(new MyPanel());
}
}
*/
/*
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.ORANGE);
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() {
Container c = getContentPane();
c.setLayout(new FlowLayout());
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, 300);
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, 300);
setVisible(true);
}
public static void main(String[] args) {
new Main();
}
}
*/
/*
import javax.swing.*;
import java.awt.*;
public class Main extends JFrame{
public Main() {
setTitle("Let's study Java");
setSize(400, 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 practice");
Container c = getContentPane();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
c.setLayout(new BorderLayout(5,7));
c.add(new JButton("North"), BorderLayout.NORTH);
c.add(new JButton("West"), BorderLayout.WEST);
c.add(new JButton("Center"), BorderLayout.CENTER);
c.add(new JButton("East"), BorderLayout.EAST);
c.add(new JButton("South"), BorderLayout.SOUTH);
setSize(400, 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("Ten Color Buttons Frame");
Container c = getContentPane();
c.setLayout(new GridLayout());
c.add(new JButton("0"));
c.add(new JButton("1"));
c.add(new JButton("2"));
c.add(new JButton("3"));
c.add(new JButton("4"));
c.add(new JButton("5"));
c.add(new JButton("6"));
c.add(new JButton("7"));
c.add(new JButton("8"));
c.add(new JButton("9"));
setSize(400, 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("Ten Color Buttons Frame");
Container c = getContentPane();
c.setLayout(new GridLayout());
//c.setBackground(Color.BLUE);
JLabel la = new JLabel("0");
JLabel la1 = new JLabel("1");
JLabel la2 = new JLabel("2");
JLabel la3 = new JLabel("3");
JLabel la4 = new JLabel("4");
JLabel la5 = new JLabel("5");
JLabel la6 = new JLabel("6");
JLabel la7 = new JLabel("7");
JLabel la8 = new JLabel("8");
JLabel la9 = new JLabel("9");
la.setOpaque(true);
la1.setOpaque(true);
la2.setOpaque(true);
la3.setOpaque(true);
la4.setOpaque(true);
la5.setOpaque(true);
la6.setOpaque(true);
la7.setOpaque(true);
la8.setOpaque(true);
la9.setOpaque(true);
la.setBackground(Color.red);
la1.setBackground(Color.orange);
la2.setBackground(Color.yellow);
la3.setBackground(Color.green);
la4.setBackground(Color.blue);
la5.setBackground(Color.gray);
la6.setBackground(Color.cyan);
la7.setBackground(Color.MAGENTA);
la8.setBackground(Color.pink);
la9.setBackground(Color.DARK_GRAY);
c.add(la);
c.add(la1);
c.add(la2);
c.add(la3);
c.add(la4);
c.add(la5);
c.add(la6);
c.add(la7);
c.add(la8);
c.add(la9);
setSize(400, 200);
setVisible(true);
}
public static void main(String[] args) {
Main ma = new Main();
}
}
*/
/*
import javax.swing.*;
import java.awt.*;
public class Main extends JFrame{
public Main() {
setTitle("4x4 Color Frame");
Container c = getContentPane();
c.setLayout(new GridLayout(4,4));
JLabel la = new JLabel("0");
la.setOpaque(true);
la.setBackground(Color.red);
c.add(la);
JLabel la1 = new JLabel("1");
la1.setOpaque(true);
la1.setBackground(Color.orange);
c.add(la1);
JLabel la2 = new JLabel("2");
la2.setOpaque(true);
la2.setBackground(Color.yellow);
c.add(la2);
JLabel la3 = new JLabel("3");
la3.setOpaque(true);
la3.setBackground(Color.green);
c.add(la3);
JLabel la4 = new JLabel("4");
la4.setOpaque(true);
la4.setBackground(Color.CYAN);
c.add(la4);
JLabel la5 = new JLabel("5");
la5.setOpaque(true);
la5.setBackground(Color.blue);
c.add(la5);
JLabel la6 = new JLabel("6");
la6.setOpaque(true);
la6.setBackground(Color.lightGray);
c.add(la6);
JLabel la7 = new JLabel("7");
la7.setOpaque(true);
la7.setBackground(Color.gray);
c.add(la7);
JLabel la8 = new JLabel("8");
la8.setOpaque(true);
la8.setBackground(Color.DARK_GRAY);
c.add(la8);
JLabel la9 = new JLabel("9");
la9.setOpaque(true);
la9.setBackground(Color.white);
c.add(la9);
JLabel la10 = new JLabel("10");
la10.setOpaque(true);
la10.setBackground(Color.PINK);
c.add(la10);
JLabel la11 = new JLabel("11");
la11.setOpaque(true);
la11.setBackground(Color.magenta);
c.add(la11);
JLabel la12 = new JLabel("12");
la12.setOpaque(true);
la12.setBackground(Color.RED);
c.add(la12);
JLabel la13 = new JLabel("13");
la13.setOpaque(true);
la13.setBackground(Color.BLACK);
c.add(la13);
JLabel la14 = new JLabel("14");
la14.setOpaque(true);
la14.setBackground(Color.green);
c.add(la14);
JLabel la15 = new JLabel("15");
la15.setOpaque(true);
la15.setBackground(Color.ORANGE);
c.add(la15);
setSize(400 , 200);
setVisible(true);
}
public static void main(String[] args) {
Main ma = new Main();
}
}
*/
import javax.swing.*;
import java.awt.*;
public class Main extends JFrame{
public Main() {
setTitle("Random Labels");
Container c = getContentPane();
setSize(300 ,300);
setVisible(true);
}
public static void main(String[] args) {
Main ma = new Main();
}
}