-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLabfilter.java
138 lines (122 loc) · 4.01 KB
/
Labfilter.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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
package phoenix;
import java.awt.BorderLayout;
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import java.awt.Color;
import javax.swing.JComboBox;
import javax.swing.JLabel;
import javax.swing.JButton;
import java.awt.Font;
import javax.swing.DefaultComboBoxModel;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Window.Type;
public class Labfilter extends JFrame {
private JPanel contentPane;
/**
* Launch the application.
*/
DisplayManager dm= new DisplayManager();
public Labfilter() {
setTitle("AUTOMATIC TIME TABLING SYSTEM");
initialise_component();
}
public Labfilter(DisplayManager d) {
dm=d;
initialise_component();
}
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
Labfilter frame = new Labfilter();
frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the frame.
*/
public void initialise_component() {
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
setBounds(100, 100, 450, 300);
contentPane = new JPanel();
contentPane.setBackground(new Color(47, 79, 79));
contentPane.setForeground(new Color(47, 79, 79));
contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
setContentPane(contentPane);
contentPane.setLayout(null);
setLocationRelativeTo(null);
JComboBox select_lab = new JComboBox();
select_lab.setModel(new DefaultComboBoxModel(new String[] {"A", "B", "C", "C1", "C2", "C3", "C4", "C5", "C6"}));
select_lab.setMaximumRowCount(9);
select_lab.setFont(new Font("Times New Roman", Font.BOLD, 18));
select_lab.setForeground(new Color(0, 204, 255));
select_lab.setBounds(212, 111, 134, 26);
contentPane.add(select_lab);
JLabel lab = new JLabel("SELECT LAB");
lab.setFont(new Font("Times New Roman", Font.BOLD, 18));
lab.setForeground(new Color(0, 204, 255));
lab.setBounds(10, 111, 134, 26);
contentPane.add(lab);
JLabel year = new JLabel("SELECT YEAR");
year.setForeground(new Color(0, 204, 255));
year.setFont(new Font("Times New Roman", Font.BOLD, 18));
year.setBounds(10, 63, 134, 26);
contentPane.add(year);
JComboBox select_year = new JComboBox();
select_year.setModel(new DefaultComboBoxModel(new String[] {"1st year", "2nd year", "3rd year", "4th year"}));
select_year.setForeground(new Color(0, 204, 255));
select_year.setFont(new Font("Times New Roman", Font.BOLD, 18));
select_year.setBounds(212, 65, 134, 26);
contentPane.add(select_year);
JButton HOME = new JButton("HOME");
HOME.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
homeActionPerformed( e);
}
});
HOME.setForeground(new Color(0, 204, 255));
HOME.setFont(new Font("Times New Roman", Font.BOLD, 18));
HOME.setBounds(10, 11, 121, 30);
contentPane.add(HOME);
JButton submit = new JButton("SUBMIT");
submit.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
submitActionPerformed( e);
}
});
submit.setFont(new Font("Times New Roman", Font.BOLD, 18));
submit.setForeground(new Color(0, 204, 255));
submit.setBounds(10, 185, 121, 30);
contentPane.add(submit);
JButton cancel = new JButton("CANCEL");
cancel.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
cancelActionPerformed( e);
}
});
cancel.setForeground(new Color(0, 204, 255));
cancel.setFont(new Font("Times New Roman", Font.BOLD, 18));
cancel.setBounds(231, 185, 115, 30);
contentPane.add(cancel);
}
private void homeActionPerformed(ActionEvent e) {
dm.load(dm);
this.setVisible(false);
}
private void submitActionPerformed(ActionEvent e) {
View v=new View();
v.setVisible(true);
this.setVisible(false);
}
private void cancelActionPerformed(ActionEvent e) {
dm.setFilterScreen(dm);
this.setVisible(false);
}
}