-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathupdateSelfStatus.java
More file actions
78 lines (60 loc) · 1.64 KB
/
updateSelfStatus.java
File metadata and controls
78 lines (60 loc) · 1.64 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
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
/** author @ Shreyash Arya (2015097)h
Tushita Rathore (2015108)
*/
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import javax.swing.*;
public class updateSelfStatus extends JFrame{
JLabel title = new JLabel("SELF STATUS");
JLabel towhom = new JLabel("Choose Status:");
JComboBox twbox;
JButton cancel = new JButton("Cancel");
JButton submit = new JButton("Submit");
public updateSelfStatus()
{
String [] type = {"--select--","Busy","Available","On-Leave"};
twbox = new JComboBox(type);
title.setBounds(100, 50, 300, 50);
title.setFont(new Font("Arial", Font.BOLD, 28));
this.add(title);
towhom.setBounds(100,150,150,20);
this.add(towhom);
twbox.setBounds(250,150,100,20);
this.add(twbox);
submit.setBounds(100, 250, 120, 20);
this.add(submit);
submitEvent se = new submitEvent();
cancel.addActionListener(se);
cancel.setBounds(250, 250, 120, 20);
this.add(cancel);
closeEvent e = new closeEvent();
cancel.addActionListener(e);
this.setLayout(null);
this.setSize(500,400);
this.setVisible(true);
this.setResizable(false);
}
public class submitEvent implements ActionListener{
public void actionPerformed(ActionEvent e)
{
dispose();
}
}
public class closeEvent implements ActionListener{
public void actionPerformed(ActionEvent e)
{
dispose();
}
}
/*public static void main(String args[])
{
updateSelfStatus slf = new updateSelfStatus();
}*/
}