-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSupervisor_Home.java
69 lines (58 loc) · 1.97 KB
/
Supervisor_Home.java
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import java.awt.SystemColor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.*;
public class Supervisor_Home {
private static JFrame frame;
private static JPanel panel;
private static JLabel homelabel;
private static JButton button_questionbank;
private static JButton button_account;
private static JButton button_import;
private static JButton button_logout;
public Supervisor_Home() {
panel = new JPanel();
panel.setBackground(SystemColor.WHITE);
frame = new JFrame("Supervisor!");
frame.setBounds(50, 50, 400, 300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.add(panel);
homelabel = new JLabel("Home");
homelabel.setBounds(10, 20, 80, 25);
panel.add(homelabel);
button_questionbank = new JButton("題庫管理");
button_questionbank.setBounds(100, 20, 80, 25);
button_questionbank.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
ItemBank itemBank = new ItemBank();
}
});
panel.add(button_questionbank);
button_account = new JButton("帳號管理");
button_account.setBounds(100, 20, 80, 25);
button_account.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
AccountInfo accountInfo = new AccountInfo();
}
});
panel.add(button_account);
button_import = new JButton("匯入資料");
button_import.setBounds(120, 20, 80, 25);
button_import.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
AccountFile accountFile = new AccountFile();
}
});
panel.add(button_import);
button_logout = new JButton("登出");
button_logout.setBounds(570, 520, 120, 25);
button_logout.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
Login login = new Login();
frame.dispose();
}
});
panel.add(button_logout);
frame.setVisible(true);
}
}