관리 메뉴

moozi

haksa 본문

TIS_2020/응용SW2020_1기

haksa

moozi 2020. 3. 30. 10:45

import java.awt.Container;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;

public class Haksa extends JFrame{

JTextField tfId=null;
JTextField tfName=null;
JTextField tfDepartment=null;
JTextField tfAddress=null;
JTextArea taList=null;

JButton btnList=null;
JButton btnInsert=null;
JButton btnUpdate=null;
JButton btnDelete=null;

public Haksa() {
this.setTitle("학사관리");
this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

Container c=this.getContentPane();
c.setLayout(new FlowLayout());

c.add(new JLabel("학번"));
this.tfId=new JTextField(20);
c.add(this.tfId);

c.add(new JLabel("이름"));
this.tfName=new JTextField(20);
c.add(this.tfName);

c.add(new JLabel("학과"));
this.tfDepartment=new JTextField(20);
c.add(this.tfDepartment);

c.add(new JLabel("주소"));
this.tfAddress=new JTextField(20);
c.add(this.tfAddress);

this.taList=new JTextArea(10,23);
c.add(new JScrollPane(this.taList));

this.btnList=new JButton("목록");
this.btnInsert=new JButton("입력");
this.btnUpdate=new JButton("수정");
this.btnDelete=new JButton("삭제");

c.add(this.btnList);
c.add(this.btnInsert);
c.add(this.btnUpdate);
c.add(this.btnDelete);

this.setSize(300,500);
this.setVisible(true);
}
public static void main(String[] args) {
new Haksa();

}

}

'TIS_2020 > 응용SW2020_1기' 카테고리의 다른 글

04/13 haksa  (0) 2020.04.13
java 그림판  (0) 2020.04.08
haksa  (0) 2020.03.30
Exam03 풀이  (0) 2020.03.25
아두이노 시뮬레이터 자료  (0) 2020.03.16
Mac에서 c/c++ 사용하기  (0) 2020.03.09
0 Comments
댓글쓰기 폼