-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathStudent
More file actions
46 lines (40 loc) · 1.03 KB
/
Student
File metadata and controls
46 lines (40 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package GUI;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField;
public class Student {
JFrame f = new JFrame("Student");
JLabel lbId = new JLabel("ID");
JTextField tfId = new JTextField(10);
JLabel lbName = new JLabel("Name");
JTextField tfName = new JTextField(10);
JLabel lbMath = new JLabel("Math");
JTextField tfMath = new JTextField(10);
JButton btnInsert = new JButton("Insert");
JButton btnUpdate = new JButton("Update");
JButton btnDelete = new JButton("Delete");
public Student() {
f.setLocation(300, 300);
f.setLayout(new GridLayout(5,2));
f.add(lbId);
f.add(tfId);
f.add(lbName);
f.add(tfName);
f.add(lbMath);
f.add(tfMath);
f.add(btnInsert);
f.add(btnUpdate);
f.add(btnDelete);
f.setSize(200 , 200);
f.pack();
f.setVisible(true);
}
public static void main(String[] args) {
// TODO Auto-generated method stub
new Student();
}
}