Model modified so that owners now request for a new house insetion or a house removal...
[RRRRHHHH_Code] / ruralHouses / src / gui / AdminMenuGUI.java
1 package gui;
2
3 import java.awt.Frame;
4
5 import javax.swing.JFrame;
6 import javax.swing.JPanel;
7 import javax.swing.border.EmptyBorder;
8 import javax.swing.GroupLayout;
9 import javax.swing.GroupLayout.Alignment;
10 import javax.swing.JButton;
11
12 import java.awt.event.ActionListener;
13 import java.awt.event.ActionEvent;
14
15 public class AdminMenuGUI extends JFrame {
16
17         /**
18          * 
19          */
20         private static final long serialVersionUID = 1L;
21         private JPanel contentPane;
22
23
24         public static void main(String[] args){
25                 Frame a = new AdminMenuGUI();
26                 a.setVisible(true);
27         }
28         /**
29          * Create the frame.
30          */
31         public AdminMenuGUI() {
32                 
33                 
34                 
35                 this.setTitle("Owner Menu");
36                 this.getContentPane().setLayout(null);
37                 setBounds(100, 100, 450, 473);
38                 contentPane = new JPanel();
39                 contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
40                 setContentPane(contentPane);
41                 //TODO BOTH BUTTONS ARE TO MODIFY
42                 JButton btnAdd = new JButton("Add Requests");
43                 btnAdd.addActionListener(new ActionListener() {
44                         public void actionPerformed(ActionEvent e) {
45                                 Frame a = new listOfAdditionRequestsGUI();
46                                 a.setVisible(true);
47                         }
48                 });
49                 
50                 JButton btnDel = new JButton("Delete Requests");
51                 btnDel.addActionListener(new ActionListener() {
52                         public void actionPerformed(ActionEvent e) {
53                                 Frame a = new listOfRemovalRequestsGUI();
54                                 a.setVisible(true);
55                         }
56                 });
57                 GroupLayout gl_contentPane = new GroupLayout(contentPane);
58                 gl_contentPane.setHorizontalGroup(
59                         gl_contentPane.createParallelGroup(Alignment.LEADING)
60                                 .addGroup(gl_contentPane.createSequentialGroup()
61                                         .addGap(115)
62                                         .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
63                                                 .addComponent(btnDel, GroupLayout.PREFERRED_SIZE, 164, GroupLayout.PREFERRED_SIZE)
64                                                 .addComponent(btnAdd, GroupLayout.PREFERRED_SIZE, 164, GroupLayout.PREFERRED_SIZE))
65                                         .addContainerGap(145, Short.MAX_VALUE))
66                 );
67                 gl_contentPane.setVerticalGroup(
68                         gl_contentPane.createParallelGroup(Alignment.LEADING)
69                                 .addGroup(gl_contentPane.createSequentialGroup()
70                                         .addGap(62)
71                                         .addComponent(btnAdd, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE)
72                                         .addGap(58)
73                                         .addComponent(btnDel, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE)
74                                         .addContainerGap(142, Short.MAX_VALUE))
75                 );
76                 contentPane.setLayout(gl_contentPane);
77         }
78
79 }