24dcb27f2b5173961a13202b2460d8c8bc6a47dc
[RRRRHHHH_Code] / ruralHouses / src / gui / AdminMenuGUI.java
1 package gui;
2
3 import java.awt.Frame;
4 import java.awt.event.ActionEvent;
5 import java.awt.event.ActionListener;
6
7 import javax.swing.JButton;
8 import javax.swing.JFrame;
9 import javax.swing.JPanel;
10 import javax.swing.border.EmptyBorder;
11
12 public class AdminMenuGUI extends JFrame {
13
14         /**
15          * 
16          */
17         private static final long serialVersionUID = 1L;
18         private JPanel contentPane;
19
20
21         
22         /**
23          * Create the frame.
24          */
25         public AdminMenuGUI() {
26                 
27                 
28                 this.setTitle("Administrator Menu");
29                 this.getContentPane().setLayout(null);
30                 setBounds(100, 100, 450, 500);
31                 contentPane = new JPanel();
32                 contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
33                 setContentPane(contentPane);
34                 //TODO BOTH BUTTONS ARE TO MODIFY
35                 JButton btnAdd = new JButton("Add requests");
36                 btnAdd.setBounds(120, 67, 164, 81);
37                 btnAdd.addActionListener(new ActionListener() {
38                         public void actionPerformed(ActionEvent e) {
39                                 Frame a = new listOfAdditionRequestsGUI();
40                                 a.setVisible(true);
41                         }
42                 });
43                 
44                 JButton btnDel = new JButton("Delete Requests");
45                 btnDel.setBounds(120, 159, 164, 73);
46                 btnDel.addActionListener(new ActionListener() {
47                         public void actionPerformed(ActionEvent e) {
48                                 Frame a = new listOfRemovalRequestsGUI();
49                                 a.setVisible(true);
50                         }
51                 });
52                 
53                 JButton btnOwneraddition = new JButton("OwnerAddition");
54                 btnOwneraddition.setBounds(120, 243, 164, 73);
55                 btnOwneraddition.addActionListener(new ActionListener() {
56                         public void actionPerformed(ActionEvent e) {
57                                 Frame a = new listOfOwnerAddittionRequests();
58                                 a.setVisible(true);
59                         }
60                 });
61                 contentPane.setLayout(null);
62                 contentPane.add(btnOwneraddition);
63                 contentPane.add(btnDel);
64                 contentPane.add(btnAdd);
65         
66                 JButton btnOwnerDeletion = new JButton("Owner Deletion");
67                 btnOwnerDeletion.setBounds(120, 331, 164, 73);
68                 btnOwnerDeletion.addActionListener(new ActionListener() {
69                         public void actionPerformed(ActionEvent e) {
70                                 Frame a = new DeleteOwnerGUI();
71                                 a.setVisible(true);
72                         }
73                 });
74                 contentPane.add(btnOwnerDeletion);
75         }
76 }