-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsupStaffviewTable.java
More file actions
79 lines (60 loc) · 1.78 KB
/
Copy pathsupStaffviewTable.java
File metadata and controls
79 lines (60 loc) · 1.78 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
79
/** 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 supStaffviewTable {
JFrame viewfr = new JFrame();
JTable table;
JButton close;
int mainCount=-1;
Object[][] data;
String department = "";
public supStaffviewTable(String dept)
{
/**
* department variable to compare according to it to open
* the view of the particular department only
*/
department = dept;
data = new Object[100][7];
String[] columnNames = {"ID","Name", "Username", "Dept.","Status"
,"Task","T-Status"};
table = new JTable(data,columnNames){
private static final long serialVersionUID = 1L;
public boolean isCellEditable(int row, int column) {
return false;};};
table.setPreferredScrollableViewportSize(new Dimension(600,100));
table.setFillsViewportHeight(true);
JScrollPane scrollPane = new JScrollPane(table);
viewfr.add(scrollPane);
scrollPane.setBounds(50, 50, 500, 200);
close = new JButton("Close");
close.setBounds(230, 280, 120, 20);
closeEvent ce = new closeEvent();
close.addActionListener(ce);
viewfr.add(close);
viewfr.setLayout(null);
viewfr.setSize(630,350);
viewfr.setVisible(true);
viewfr.setTitle("Member Registration Requests");
}
public class closeEvent implements ActionListener{
public void actionPerformed(ActionEvent e)
{
viewfr.dispose();
}
}
/*public static void main(String args[])
{
viewSupStaffTable n = new viewSupStaffTable();
}*/
}