Skip to content

Commit

Permalink
Merge branch 'alchon'
Browse files Browse the repository at this point in the history
  • Loading branch information
hbseo committed Nov 10, 2016
2 parents 8a85358 + dd2b7c7 commit bf84636
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
29 changes: 29 additions & 0 deletions hb/gridtest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;

class GridTest extends JFrame {
GridTest() {
setTitle("GridTest");
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container contentPane = getContentPane();
contentPane.setLayout(new GridLayout(4,3,5,5));
contentPane.add(new JButton("7"));
contentPane.add(new JButton("8"));
contentPane.add(new JButton("9"));
contentPane.add(new JButton("4"));
contentPane.add(new JButton("5"));
contentPane.add(new JButton("6"));
contentPane.add(new JButton("1"));
contentPane.add(new JButton("2"));
contentPane.add(new JButton("3"));
contentPane.add(new JButton("0"));
contentPane.add(new JButton("."));
setSize(250,350);
setVisible(true);
}
public static void main(String[] args) {
new GridTest();
}
}
22 changes: 22 additions & 0 deletions hb/test.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import javax.swing.*;
import java.awt.*;
import javax.swing.event.*;
import java.awt.event.*;

class MyFrame extends JFrame {
MyFrame() {
setTitle("테스트");
Container contentPane = getContentPane();
contentPane.setBackground(Color.CYAN);
contentPane.setLayout(new FlowLayout());
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
contentPane.add(new JButton("1"));
contentPane.add(new JButton("2"));
contentPane.add(new JButton("3"));
setSize(300,300);
setVisible(true);
}
public static void main(String[] args) {
MyFrame f = new MyFrame();
}
}

0 comments on commit bf84636

Please sign in to comment.