-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainWindow.java
138 lines (124 loc) · 3.31 KB
/
MainWindow.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
import java.awt.EventQueue;
import javax.swing.JFrame;
import javax.swing.JTable;
import javax.swing.JButton;
import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Button;
public class MainWindow {
private JFrame frame;
/**
* Launch the application.
*/
public static void main(String[] args) {
EventQueue.invokeLater(new Runnable() {
public void run() {
try {
MainWindow window = new MainWindow();
window.frame.setVisible(true);
} catch (Exception e) {
e.printStackTrace();
}
}
});
}
/**
* Create the application.
*/
MainWindow() {
initialize();
}
/**
* Initialize the contents of the frame.
*/
private void initialize() {
frame = new JFrame();
frame.setBounds(100, 100, 450, 300);
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.getContentPane().setLayout(null);
JButton btnRun = new JButton("RUN ALL");
btnRun.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent arg0) {
}
});
btnRun.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent arg0) {
String[] args = {};
AssignmentOSIntegrated.main(args);
}
});
btnRun.setBounds(165, 103, 97, 25);
frame.getContentPane().add(btnRun);
Button FCFS = new Button("FCFS");
FCFS.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent arg0) {
String[] args = {};
FirstComeFirstServe.main(args);
}
});
FCFS.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
FCFS.setBounds(23, 30, 79, 24);
frame.getContentPane().add(FCFS);
Button Preemptive_Priority = new Button("Pre..Prio");
Preemptive_Priority.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
String[] args={};
priorityPreemtive.main(args);
}
});
Preemptive_Priority.setBounds(23, 178, 79, 24);
frame.getContentPane().add(Preemptive_Priority);
Button SRJF = new Button("SRJF");
SRJF.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
String[] args={};
preemptive.main(args);
}
});
SRJF.setBounds(322, 178, 79, 24);
frame.getContentPane().add(SRJF);
Button RR = new Button("RR");
RR.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
String[] args={};
roundRobin.main(args);
}
});
RR.setBounds(311, 30, 79, 24);
frame.getContentPane().add(RR);
Button SJF = new Button("SJF");
SJF.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
String[] args={};
nonpreemptive.main(args);
}
});
SJF.setBounds(175, 30, 79, 24);
frame.getContentPane().add(SJF);
Button NonPreemptivePriority = new Button("NonPre-Prio");
NonPreemptivePriority.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
String[] args={};
priorityNonPreemptive.main(args);
}
});
NonPreemptivePriority.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
}
});
NonPreemptivePriority.setBounds(175, 178, 79, 24);
frame.getContentPane().add(NonPreemptivePriority);
}
}