SelectionProcedure.java
1 |
|
2 |
import javax.swing.*; |
3 |
|
4 |
/** |
5 |
* SelectionProcedure - A view that gives the user a choice over which selection procedure to follow. |
6 |
* @author Maarten Vangeneugden |
7 |
*/ |
8 |
public class SelectionProcedure { |
9 |
|
10 |
public static void main(String[] args) { |
11 |
MainWindow window = new MainWindow("Selectieprocedure inschrijvingen", null); |
12 |
ButtonGroup options = new ButtonGroup(); |
13 |
JRadioButton fifo = new JRadioButton("Eerdere aanmelding heeft voorrang"); |
14 |
JRadioButton next = new JRadioButton("Voorrang volgens studentennummer"); |
15 |
JRadioButton random = new JRadioButton("Willekeurige voorrang"); |
16 |
|
17 |
JButton accept = new JButton("Doorgaan"); |
18 |
accept.addActionListener(actionPerformed); |
19 |
|
20 |
options.add(fifo); |
21 |
options.add(next); |
22 |
options.add(random); |
23 |
|
24 |
window.addWidget(fifo); |
25 |
window.addWidget(next); |
26 |
window.addWidget(random); |
27 |
|
28 |
window.makeVisible(); |
29 |
} |
30 |
|
31 |
public static void actionPerformed(ActionEvent e) { |
32 |
// This will close the window and send the choice to its listeners. |
33 |
} |
34 |
|
35 |
} |
36 |