package swing.frame; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.GridLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; public class Calculator extends JFrame { public Calculator(String title) { //this없어도됨 //title설정 setTitle(title); //size설정(width,height) setSize(230, 400);..
package swing.frame; import java.awt.GridLayout; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JTextField; public class GridLayoutFrame extends JFrame { public GridLayoutFrame(String title) { //this없어도됨 //title설정 setTitle(title); //size설정(width,height) setSize(300, 300); //위치 설정(x,y) setLocation(800, 300); //종료관리(보통 EXIT_ON_CLOSE를 사용, 상수3) s..
package swing.frame; import java.awt.FlowLayout; import javax.swing.JButton; import javax.swing.JFrame; public class FlowLayoutFrame extends JFrame { public FlowLayoutFrame(String title) { //this없어도됨 //title설정 setTitle(title); //size설정(width,height) setSize(300, 300); //위치 설정(x,y) setLocation(800, 300); //종료관리(보통 EXIT_ON_CLOSE를 사용, 상수3) setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //레이아웃 setL..
package swing.frame; import javax.swing.JFrame; public class MyFrame extends JFrame { public MyFrame(String title) { this.setTitle(title); //this없어도됨 //title설정 this.setSize(680, 700);//size설정(width,height) setLocation(800, 300); //위치 설정(x,y) //종료관리(보통 EXIT_ON_CLOSE를 사용, 상수3) setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); //창그리기 this.setVisible(true); } public static void main(String[] args) { /..