Dev_Study/Java
-
[JAVA / SWING] 배치관리자(Layout Manager) - GridLayoutDev_Study/Java 2016. 10. 7. 05:10
import java.awt.GridLayout; import javax.swing.JButton; import javax.swing.JFrame; public class GridLayoutEx extends JFrame { public GridLayoutEx (){ setLayout(new GridLayout(0, 4)); //GridLayout(행, 열) setTitle("GridLayout 입니다"); setSize(300, 300); setLocationRelativeTo(null); //화면 중앙에 생성 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setVisible(true); JButton bt1 = new JButton("버튼1"); JButton ..
-
[JAVA / SWING] 배치관리자(Layout Manager) - BorderLayoutDev_Study/Java 2016. 10. 7. 05:10
import java.awt.BorderLayout; import javax.swing.JButton; import javax.swing.JFrame; public class BorderLayoutEx extends JFrame { public BorderLayoutEx (){ setLayout(new BorderLayout()); //프레임 배치관리자 setTitle("BorderLayout 입니다"); setSize(300, 300); setLocationRelativeTo(null); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setVisible(true); JButton bt1 = new JButton("버튼1"); JButton bt2 = new JBu..
-
[JAVA / SWING] 배치관리자(Layout Manager) - FlowLayoutDev_Study/Java 2016. 10. 7. 05:10
import java.awt.FlowLayout; import javax.swing.JButton; import javax.swing.JFrame; public class FlowLayoutEx extends JFrame { public FlowLayoutEx (){ setLayout(new FlowLayout()); //프레임 배치관리자 setTitle("FlowLayout 입니다"); setSize(300, 300); setLocationRelativeTo(null); //화면 중앙에 생성 setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setVisible(true); JButton bt1 = new JButton("버튼1"); JButton bt2 = new J..