/Users/johnr/Desktop/IA_14_-_Stage_P_Upload_all_2021-04-08/USEmbassyIA 2 Nirvan - Final/src/usembassyia/MainGUI.java |
1
2
3
4
5
6 package usembassyia;
7
8 import java.util.ArrayList;
9
10
11
12
13
14
15 @author
16
17 public class MainGUI extends javax.swing.JFrame {
18
19
20
21
22
23 ArrayList<Trip> tripsList = new ArrayList<>();
24 ArrayList<Courier> courierArrayList = new ArrayList <>();
25 Courier[] courierArray = new Courier[10];
26 Destination[] destinationArray = new Destination[4];
27 SortingAndAlgorithms s = new SortingAndAlgorithms();
28
29 public MainGUI() {
30 initComponents();
31
32 for(int i = 0; i < courierArray.length; i++){
33 courierArray[i] = new Courier();
34
35 courierArray[i].setSecurityClearance(5);
36
37 }
38
39 courierArray[0].setName("Davis, Henry");
40 courierArray[1].setName("Smith, Taku");
41 courierArray[2].setName("Gomes, Archie");
42 courierArray[3].setName("Wilkins, Olivia");
43 courierArray[4].setName("Berry, Ryan");
44 courierArray[5].setName("Howard, Molly");
45 courierArray[6].setName("Terry, Joane");
46 courierArray[7].setName("Bond, Jane");
47 courierArray[8].setName("Vance, Jeremy");
48 courierArray[9].setName("Ellison, Colin");
49
50 courierArray[0].setDateTenured(2019);
51 courierArray[1].setDateTenured(2003);
52 courierArray[2].setDateTenured(2015);
53 courierArray[3].setDateTenured(2014);
54 courierArray[4].setDateTenured(2020);
55 courierArray[5].setDateTenured(1998);
56 courierArray[6].setDateTenured(1997);
57 courierArray[7].setDateTenured(2005);
58 courierArray[8].setDateTenured(2016);
59 courierArray[9].setDateTenured(2017);
60
61
62 for(int i = 0; i < destinationArray.length; i++){
63 destinationArray[i] = new Destination();
64
65
66 }
67 for (Destination destinationArray1 : destinationArray) {
68 destinationArray1.setCounter(0);
69 }
70 for(int i =0; i < courierArray.length; i++){
71 for(int t =0; t < courierArray[i].allDestinations.length; t++){
72 courierArray[i].allDestinations[t].setHasVisa(false);
73 }
74 }
75
76
77 destinationArray[0].setName("JAK");
78 destinationArray[1].setName("BKK");
79 destinationArray[2].setName("LEN");
80 destinationArray[3].setName("BAN");
81
82
83
84 }
85
Netbeans auto-generated GUI code pasted at end of this file.
574
575 private void submitCourierButtonMouseReleased(java.awt.event.MouseEvent evt) {
576
577 int employeeIndex = employeeCB.getSelectedIndex();
578 int destinationIndex = destinationCB.getSelectedIndex();
579 boolean hasVisa = hasVisaCB.isSelected();
580 courierArray[employeeIndex].allDestinations[destinationIndex].counter++;
581 courierArray[employeeIndex].allDestinations[destinationIndex].setHasVisa(hasVisa);
582 String month = String.valueOf(jMonthChooser1.getMonth());
583 String day = String.valueOf(jDayChooser1.getDay());
584 String year = String.valueOf(jYearChooser2.getYear());
585 String inputtedDate = new String(month + "/"+ day +"/"+ year);
586
587
588
589 Trip newTrip = new Trip(courierArray[employeeIndex], destinationArray[destinationIndex],inputtedDate);
590 tripsList.add(newTrip);
591
592 employeeCB.setSelectedIndex(0);
593 destinationCB.setSelectedIndex(0);
594 }
595
596 private void submitCourierButtonMouseClicked(java.awt.event.MouseEvent evt) {
597
598 }
599
600 private void employeeCBPropertyChange(java.beans.PropertyChangeEvent evt) {
601
602
603 }
604
605 private void calculateCourierActionPerformed(java.awt.event.ActionEvent evt) {
606
607
608 int destinationIndex = jList1.getSelectedIndex();
609 courierArrayList = s.sortByHasVisa(courierArray, destinationIndex);
610 int courierIndex = s.tripDeterminer(courierArrayList, destinationIndex);
611 System.out.println(courierArrayList.get(courierIndex).getName());
612 int freqPosSer = courierArrayList.get(courierIndex).allDestinations[destinationIndex].getFrequencyOfPostService();
613 String fps = String.valueOf(freqPosSer);
614 CourierNameTF.setText(courierArrayList.get(courierIndex).getName());
615 freqPosSerTF.setText(fps);
616
617 }
618
619 private void refreshButtonMouseReleased(java.awt.event.MouseEvent evt) {
620
621 for (int row = 0; row < tripsList.size(); row++) {
622 displayTable.setValueAt(tripsList.get(row).getTripCourier().getName(), row, 0);
623 displayTable.setValueAt(tripsList.get(row).getTripDestination().getName(), row, 1);
624 displayTable.setValueAt(tripsList.get(row).getTripDate(), row, 2);
625
626 }
627 }
628
629
630 @param args
631
632 public static void main(String args[]) {
633
634
635
636
637
638 try {
639 for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
640 if ("Nimbus".equals(info.getName())) {
641 javax.swing.UIManager.setLookAndFeel(info.getClassName());
642 break;
643 }
644 }
645 } catch (ClassNotFoundException ex) {
646 java.util.logging.Logger.getLogger(MainGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
647 } catch (InstantiationException ex) {
648 java.util.logging.Logger.getLogger(MainGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
649 } catch (IllegalAccessException ex) {
650 java.util.logging.Logger.getLogger(MainGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
651 } catch (javax.swing.UnsupportedLookAndFeelException ex) {
652 java.util.logging.Logger.getLogger(MainGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
653 }
654
655
656
657 java.awt.EventQueue.invokeLater(new Runnable() {
658 public void run() {
659 new MainGUI().setVisible(true);
660 }
661 });
662 }
Auto-generated Netbeans GUI code:
86
87 This method is called from within the constructor to initialize the form.
88
89
90
91 @SuppressWarnings("unchecked")
92 // <editor-fold defaultstate="collapsed" desc="Generated Code">
93 private void initComponents() {
94
95 jMonthChooser1 = new com.toedter.calendar.JMonthChooser();
96 jYearChooser1 = new com.toedter.calendar.JYearChooser();
97 jPanel1 = new javax.swing.JPanel();
98 jTabbedPane1 = new javax.swing.JTabbedPane();
99 jPanel2 = new javax.swing.JPanel();
100 jLabel1 = new javax.swing.JLabel();
101 employeeCB = new javax.swing.JComboBox<>();
102 jLabel2 = new javax.swing.JLabel();
103 jLabel3 = new javax.swing.JLabel();
104 submitCourierButton = new javax.swing.JButton();
105 destinationCB = new javax.swing.JComboBox<>();
106 jDayChooser1 = new com.toedter.calendar.JDayChooser();
107 jYearChooser2 = new com.toedter.calendar.JYearChooser();
108 jMonthChooser2 = new com.toedter.calendar.JMonthChooser();
109 hasVisaCB = new javax.swing.JCheckBox();
110 Calendar = new javax.swing.JPanel();
111 refreshButton = new javax.swing.JButton();
112 jScrollPane2 = new javax.swing.JScrollPane();
113 displayTable = new javax.swing.JTable();
114 jPanel4 = new javax.swing.JPanel();
115 jScrollPane1 = new javax.swing.JScrollPane();
116 jList1 = new javax.swing.JList<>();
117 jLabel4 = new javax.swing.JLabel();
118 jLabel5 = new javax.swing.JLabel();
119 jScrollBar1 = new javax.swing.JScrollBar();
120 calculateCourier = new javax.swing.JButton();
121 jLabel6 = new javax.swing.JLabel();
122 freqPosSerTF = new javax.swing.JTextField();
123 CourierNameTF = new javax.swing.JTextField();
124 menuBar = new javax.swing.JMenuBar();
125 fileMenu = new javax.swing.JMenu();
126 openMenuItem = new javax.swing.JMenuItem();
127 saveMenuItem = new javax.swing.JMenuItem();
128 saveAsMenuItem = new javax.swing.JMenuItem();
129 exitMenuItem = new javax.swing.JMenuItem();
130 editMenu = new javax.swing.JMenu();
131 cutMenuItem = new javax.swing.JMenuItem();
132 copyMenuItem = new javax.swing.JMenuItem();
133 pasteMenuItem = new javax.swing.JMenuItem();
134 deleteMenuItem = new javax.swing.JMenuItem();
135 helpMenu = new javax.swing.JMenu();
136 contentsMenuItem = new javax.swing.JMenuItem();
137 aboutMenuItem = new javax.swing.JMenuItem();
138
139 setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
140
141 jLabel1.setText("Input Employee:");
142
143 employeeCB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Davis, Henry", "Smith, Taku", "Gomes, Archie", "Wilkins, Olivia", "Berry, Ryan", "Howard, Molly", "Terry, Joane", "Bond, Jane", "Vance, Jeremy", "Ellison, Colin" }));
144 employeeCB.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
145 public void propertyChange(java.beans.PropertyChangeEvent evt) {
146 employeeCBPropertyChange(evt);
147 }
148 });
149
150 jLabel2.setText("Input Destination:");
151
152 jLabel3.setText("Input Date Travelled or Travelling");
153
154 submitCourierButton.setText("Done");
155 submitCourierButton.addMouseListener(new java.awt.event.MouseAdapter() {
156 public void mouseClicked(java.awt.event.MouseEvent evt) {
157 submitCourierButtonMouseClicked(evt);
158 }
159 public void mouseReleased(java.awt.event.MouseEvent evt) {
160 submitCourierButtonMouseReleased(evt);
161 }
162 });
163 submitCourierButton.addActionListener(new java.awt.event.ActionListener() {
164 public void actionPerformed(java.awt.event.ActionEvent evt) {
165 submitCourierButtonActionPerformed(evt);
166 }
167 });
168
169 destinationCB.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "JAK", "BKK", "LEN", "BAN" }));
170
171 hasVisaCB.setText("Selected Courier Still Has A Current Visa");
172
173 javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
174 jPanel2.setLayout(jPanel2Layout);
175 jPanel2Layout.setHorizontalGroup(
176 jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
177 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
178 .addContainerGap(142, Short.MAX_VALUE)
179 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
180 .addGroup(jPanel2Layout.createSequentialGroup()
181 .addGap(20, 20, 20)
182 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
183 .addComponent(jLabel3)
184 .addComponent(jLabel2)
185 .addComponent(jLabel1)
186 .addGroup(jPanel2Layout.createSequentialGroup()
187 .addComponent(destinationCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
188 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
189 .addComponent(hasVisaCB))
190 .addComponent(employeeCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
191 .addGroup(jPanel2Layout.createSequentialGroup()
192 .addGap(13, 13, 13)
193 .addComponent(submitCourierButton))
194 .addComponent(jDayChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
195 .addGroup(jPanel2Layout.createSequentialGroup()
196 .addComponent(jMonthChooser2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
197 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
198 .addComponent(jYearChooser2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
199 .addGap(124, 124, 124))
200 );
201 jPanel2Layout.setVerticalGroup(
202 jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
203 .addGroup(jPanel2Layout.createSequentialGroup()
204 .addGap(41, 41, 41)
205 .addComponent(jLabel3)
206 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
207 .addComponent(jLabel1)
208 .addGap(9, 9, 9)
209 .addComponent(employeeCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
210 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
211 .addComponent(jLabel2)
212 .addGap(11, 11, 11)
213 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
214 .addComponent(destinationCB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
215 .addComponent(hasVisaCB, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
216 .addGap(38, 38, 38)
217 .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
218 .addComponent(jMonthChooser2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
219 .addComponent(jYearChooser2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
220 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 23, Short.MAX_VALUE)
221 .addComponent(jDayChooser1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
222 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
223 .addComponent(submitCourierButton)
224 .addGap(76, 76, 76))
225 );
226
227 jTabbedPane1.addTab("Employee Information", jPanel2);
228
229 refreshButton.setText("Refresh");
230 refreshButton.addMouseListener(new java.awt.event.MouseAdapter() {
231 public void mouseReleased(java.awt.event.MouseEvent evt) {
232 refreshButtonMouseReleased(evt);
233 }
234 });
235 refreshButton.addActionListener(new java.awt.event.ActionListener() {
236 public void actionPerformed(java.awt.event.ActionEvent evt) {
237 refreshButtonActionPerformed(evt);
238 }
239 });
240
241 displayTable.setModel(new javax.swing.table.DefaultTableModel(
242 new Object [][] {
243 {null, null, null},
244 {null, null, null},
245 {null, null, null},
246 {null, null, null},
247 {null, null, null},
248 {null, null, null},
249 {null, null, null},
250 {null, null, null},
251 {null, null, null},
252 {null, null, null},
253 {null, null, null},
254 {null, null, null},
255 {null, null, null},
256 {null, null, null},
257 {null, null, null},
258 {null, null, null},
259 {null, null, null},
260 {null, null, null},
261 {null, null, null},
262 {null, null, null},
263 {null, null, null},
264 {null, null, null},
265 {null, null, null},
266 {null, null, null},
267 {null, null, null},
268 {null, null, null},
269 {null, null, null},
270 {null, null, null},
271 {null, null, null},
272 {null, null, null},
273 {null, null, null},
274 {null, null, null},
275 {null, null, null},
276 {null, null, null},
277 {null, null, null},
278 {null, null, null},
279 {null, null, null},
280 {null, null, null},
281 {null, null, null},
282 {null, null, null},
283 {null, null, null},
284 {null, null, null},
285 {null, null, null},
286 {null, null, null},
287 {null, null, null},
288 {null, null, null},
289 {null, null, null},
290 {null, null, null},
291 {null, null, null},
292 {null, null, null},
293 {null, null, null},
294 {null, null, null},
295 {null, null, null},
296 {null, null, null},
297 {null, null, null},
298 {null, null, null},
299 {null, null, null},
300 {null, null, null},
301 {null, null, null},
302 {null, null, null},
303 {null, null, null},
304 {null, null, null},
305 {null, null, null},
306 {null, null, null},
307 {null, null, null},
308 {null, null, null},
309 {null, null, null},
310 {null, null, null},
311 {null, null, null},
312 {null, null, null},
313 {null, null, null},
314 {null, null, null},
315 {null, null, null},
316 {null, null, null},
317 {null, null, null},
318 {null, null, null},
319 {null, null, null},
320 {null, null, null},
321 {null, null, null},
322 {null, null, null},
323 {null, null, null},
324 {null, null, null},
325 {null, null, null},
326 {null, null, null},
327 {null, null, null},
328 {null, null, null},
329 {null, null, null},
330 {null, null, null},
331 {null, null, null},
332 {null, null, null},
333 {null, null, null},
334 {null, null, null},
335 {null, null, null},
336 {null, null, null},
337 {null, null, null},
338 {null, null, null},
339 {null, null, null},
340 {null, null, null},
341 {null, null, null}
342 },
343 new String [] {
344 "Name", "Destination", "Date"
345 }
346 ));
347 jScrollPane2.setViewportView(displayTable);
348
349 javax.swing.GroupLayout CalendarLayout = new javax.swing.GroupLayout(Calendar);
350 Calendar.setLayout(CalendarLayout);
351 CalendarLayout.setHorizontalGroup(
352 CalendarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
353 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, CalendarLayout.createSequentialGroup()
354 .addContainerGap(21, Short.MAX_VALUE)
355 .addGroup(CalendarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
356 .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
357 .addComponent(refreshButton))
358 .addGap(60, 60, 60))
359 );
360 CalendarLayout.setVerticalGroup(
361 CalendarLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
362 .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, CalendarLayout.createSequentialGroup()
363 .addGap(16, 16, 16)
364 .addComponent(jScrollPane2)
365 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
366 .addComponent(refreshButton)
367 .addGap(35, 35, 35))
368 );
369
370 jTabbedPane1.addTab("Trip History", Calendar);
371
372 jList1.setModel(new javax.swing.AbstractListModel<String>() {
373 String[] strings = { "JAK", "BKK", "LEN", "BAN" };
374 public int getSize() { return strings.length; }
375 public String getElementAt(int i) { return strings[i]; }
376 });
377 jList1.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
378 public void propertyChange(java.beans.PropertyChangeEvent evt) {
379 jList1PropertyChange(evt);
380 }
381 });
382 jScrollPane1.setViewportView(jList1);
383
384 jLabel4.setText("Choose Destination:");
385
386 jLabel5.setText("Best Courier For The Job:");
387
388 calculateCourier.setText("Calculate");
389 calculateCourier.addActionListener(new java.awt.event.ActionListener() {
390 public void actionPerformed(java.awt.event.ActionEvent evt) {
391 calculateCourierActionPerformed(evt);
392 }
393 });
394
395 jLabel6.setText("Frequency of post service:");
396
397 freqPosSerTF.setText("Frequency");
398 freqPosSerTF.addActionListener(new java.awt.event.ActionListener() {
399 public void actionPerformed(java.awt.event.ActionEvent evt) {
400 freqPosSerTFActionPerformed(evt);
401 }
402 });
403
404 CourierNameTF.setText("Last, First");
405 CourierNameTF.addActionListener(new java.awt.event.ActionListener() {
406 public void actionPerformed(java.awt.event.ActionEvent evt) {
407 CourierNameTFActionPerformed(evt);
408 }
409 });
410
411 javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
412 jPanel4.setLayout(jPanel4Layout);
413 jPanel4Layout.setHorizontalGroup(
414 jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
415 .addGroup(jPanel4Layout.createSequentialGroup()
416 .addGap(58, 58, 58)
417 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
418 .addComponent(jLabel4)
419 .addGroup(jPanel4Layout.createSequentialGroup()
420 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 126, javax.swing.GroupLayout.PREFERRED_SIZE)
421 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
422 .addComponent(jScrollBar1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
423 .addComponent(calculateCourier))
424 .addGap(87, 87, 87)
425 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
426 .addComponent(jLabel5)
427 .addComponent(jLabel6)
428 .addComponent(freqPosSerTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
429 .addComponent(CourierNameTF, javax.swing.GroupLayout.PREFERRED_SIZE, 103, javax.swing.GroupLayout.PREFERRED_SIZE))
430 .addContainerGap(127, Short.MAX_VALUE))
431 );
432 jPanel4Layout.setVerticalGroup(
433 jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
434 .addGroup(jPanel4Layout.createSequentialGroup()
435 .addGap(44, 44, 44)
436 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
437 .addComponent(jLabel4)
438 .addComponent(jLabel5))
439 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
440 .addGroup(jPanel4Layout.createSequentialGroup()
441 .addGap(42, 42, 42)
442 .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
443 .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 344, javax.swing.GroupLayout.PREFERRED_SIZE)
444 .addComponent(jScrollBar1, javax.swing.GroupLayout.PREFERRED_SIZE, 344, javax.swing.GroupLayout.PREFERRED_SIZE))
445 .addGap(18, 18, 18)
446 .addComponent(calculateCourier))
447 .addGroup(jPanel4Layout.createSequentialGroup()
448 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
449 .addComponent(CourierNameTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
450 .addGap(31, 31, 31)
451 .addComponent(jLabel6)
452 .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
453 .addComponent(freqPosSerTF, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
454 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
455 );
456
457 jTabbedPane1.addTab("Next Best Courier", jPanel4);
458
459 javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
460 jPanel1.setLayout(jPanel1Layout);
461 jPanel1Layout.setHorizontalGroup(
462 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
463 .addGroup(jPanel1Layout.createSequentialGroup()
464 .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 555, javax.swing.GroupLayout.PREFERRED_SIZE)
465 .addGap(0, 32, Short.MAX_VALUE))
466 );
467 jPanel1Layout.setVerticalGroup(
468 jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
469 .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.TRAILING)
470 );
471
472 fileMenu.setMnemonic('f');
473 fileMenu.setText("File");
474
475 openMenuItem.setMnemonic('o');
476 openMenuItem.setText("Open");
477 fileMenu.add(openMenuItem);
478
479 saveMenuItem.setMnemonic('s');
480 saveMenuItem.setText("Save");
481 fileMenu.add(saveMenuItem);
482
483 saveAsMenuItem.setMnemonic('a');
484 saveAsMenuItem.setText("Save As ...");
485 saveAsMenuItem.setDisplayedMnemonicIndex(5);
486 fileMenu.add(saveAsMenuItem);
487
488 exitMenuItem.setMnemonic('x');
489 exitMenuItem.setText("Exit");
490 exitMenuItem.addActionListener(new java.awt.event.ActionListener() {
491 public void actionPerformed(java.awt.event.ActionEvent evt) {
492 exitMenuItemActionPerformed(evt);
493 }
494 });
495 fileMenu.add(exitMenuItem);
496
497 menuBar.add(fileMenu);
498
499 editMenu.setMnemonic('e');
500 editMenu.setText("Edit");
501
502 cutMenuItem.setMnemonic('t');
503 cutMenuItem.setText("Cut");
504 editMenu.add(cutMenuItem);
505
506 copyMenuItem.setMnemonic('y');
507 copyMenuItem.setText("Copy");
508 editMenu.add(copyMenuItem);
509
510 pasteMenuItem.setMnemonic('p');
511 pasteMenuItem.setText("Paste");
512 editMenu.add(pasteMenuItem);
513
514 deleteMenuItem.setMnemonic('d');
515 deleteMenuItem.setText("Delete");
516 editMenu.add(deleteMenuItem);
517
518 menuBar.add(editMenu);
519
520 helpMenu.setMnemonic('h');
521 helpMenu.setText("Help");
522
523 contentsMenuItem.setMnemonic('c');
524 contentsMenuItem.setText("Contents");
525 helpMenu.add(contentsMenuItem);
526
527 aboutMenuItem.setMnemonic('a');
528 aboutMenuItem.setText("About");
529 helpMenu.add(aboutMenuItem);
530
531 menuBar.add(helpMenu);
532
533 setJMenuBar(menuBar);
534
535 javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
536 getContentPane().setLayout(layout);
537 layout.setHorizontalGroup(
538 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
539 .addGroup(layout.createSequentialGroup()
540 .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
541 .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
542 );
543 layout.setVerticalGroup(
544 layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
545 .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
546 );
547
548 pack();
549 }// </editor-fold>
550
551 private void exitMenuItemActionPerformed(java.awt.event.ActionEvent evt) {
552 System.exit(0);
553 }
554
555 private void freqPosSerTFActionPerformed(java.awt.event.ActionEvent evt) {
556
557 }
558
559 private void CourierNameTFActionPerformed(java.awt.event.ActionEvent evt) {
560
561 }
562
563 private void refreshButtonActionPerformed(java.awt.event.ActionEvent evt) {
564
565 }
566
567 private void jList1PropertyChange(java.beans.PropertyChangeEvent evt) {
568
569 }
570
571 private void submitCourierButtonActionPerformed(java.awt.event.ActionEvent evt) {
572
573 }
663
664 // Variables declaration - do not modify
665 private javax.swing.JPanel Calendar;
666 private javax.swing.JTextField CourierNameTF;
667 private javax.swing.JMenuItem aboutMenuItem;
668 private javax.swing.JButton calculateCourier;
669 private javax.swing.JMenuItem contentsMenuItem;
670 private javax.swing.JMenuItem copyMenuItem;
671 private javax.swing.JMenuItem cutMenuItem;
672 private javax.swing.JMenuItem deleteMenuItem;
673 private javax.swing.JComboBox<String> destinationCB;
674 private javax.swing.JTable displayTable;
675 private javax.swing.JMenu editMenu;
676 private javax.swing.JComboBox<String> employeeCB;
677 private javax.swing.JMenuItem exitMenuItem;
678 private javax.swing.JMenu fileMenu;
679 private javax.swing.JTextField freqPosSerTF;
680 private javax.swing.JCheckBox hasVisaCB;
681 private javax.swing.JMenu helpMenu;
682 private com.toedter.calendar.JDayChooser jDayChooser1;
683 private javax.swing.JLabel jLabel1;
684 private javax.swing.JLabel jLabel2;
685 private javax.swing.JLabel jLabel3;
686 private javax.swing.JLabel jLabel4;
687 private javax.swing.JLabel jLabel5;
688 private javax.swing.JLabel jLabel6;
689 private javax.swing.JList<String> jList1;
690 private com.toedter.calendar.JMonthChooser jMonthChooser1;
691 private com.toedter.calendar.JMonthChooser jMonthChooser2;
692 private javax.swing.JPanel jPanel1;
693 private javax.swing.JPanel jPanel2;
694 private javax.swing.JPanel jPanel4;
695 private javax.swing.JScrollBar jScrollBar1;
696 private javax.swing.JScrollPane jScrollPane1;
697 private javax.swing.JScrollPane jScrollPane2;
698 private javax.swing.JTabbedPane jTabbedPane1;
699 private com.toedter.calendar.JYearChooser jYearChooser1;
700 private com.toedter.calendar.JYearChooser jYearChooser2;
701 private javax.swing.JMenuBar menuBar;
702 private javax.swing.JMenuItem openMenuItem;
703 private javax.swing.JMenuItem pasteMenuItem;
704 private javax.swing.JButton refreshButton;
705 private javax.swing.JMenuItem saveAsMenuItem;
706 private javax.swing.JMenuItem saveMenuItem;
707 private javax.swing.JButton submitCourierButton;
708 // End of variables declaration
709
710 }
711