Merge branch 'master' of https://xp-dev.com/git/RRRRHHHH_Code
[RRRRHHHH_Code] / ruralHouses / src / gui / AdminMenuGUI.java
index 5408e60..24dcb27 100644 (file)
@@ -4,8 +4,6 @@ import java.awt.Frame;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 
-import javax.swing.GroupLayout;
-import javax.swing.GroupLayout.Alignment;
 import javax.swing.JButton;
 import javax.swing.JFrame;
 import javax.swing.JPanel;
@@ -20,25 +18,22 @@ public class AdminMenuGUI extends JFrame {
        private JPanel contentPane;
 
 
-       public static void main(String[] args){
-               Frame a = new AdminMenuGUI();
-               a.setVisible(true);
-       }
+       
        /**
         * Create the frame.
         */
        public AdminMenuGUI() {
                
                
-               
-               this.setTitle("Owner Menu");
+               this.setTitle("Administrator Menu");
                this.getContentPane().setLayout(null);
-               setBounds(100, 100, 450, 473);
+               setBounds(100, 100, 450, 500);
                contentPane = new JPanel();
                contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
                setContentPane(contentPane);
                //TODO BOTH BUTTONS ARE TO MODIFY
-               JButton btnAdd = new JButton("Add Requests");
+               JButton btnAdd = new JButton("Add requests");
+               btnAdd.setBounds(120, 67, 164, 81);
                btnAdd.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                                Frame a = new listOfAdditionRequestsGUI();
@@ -47,32 +42,35 @@ public class AdminMenuGUI extends JFrame {
                });
                
                JButton btnDel = new JButton("Delete Requests");
+               btnDel.setBounds(120, 159, 164, 73);
                btnDel.addActionListener(new ActionListener() {
                        public void actionPerformed(ActionEvent e) {
                                Frame a = new listOfRemovalRequestsGUI();
                                a.setVisible(true);
                        }
                });
-               GroupLayout gl_contentPane = new GroupLayout(contentPane);
-               gl_contentPane.setHorizontalGroup(
-                       gl_contentPane.createParallelGroup(Alignment.LEADING)
-                               .addGroup(gl_contentPane.createSequentialGroup()
-                                       .addGap(115)
-                                       .addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING)
-                                               .addComponent(btnDel, GroupLayout.PREFERRED_SIZE, 164, GroupLayout.PREFERRED_SIZE)
-                                               .addComponent(btnAdd, GroupLayout.PREFERRED_SIZE, 164, GroupLayout.PREFERRED_SIZE))
-                                       .addContainerGap(145, Short.MAX_VALUE))
-               );
-               gl_contentPane.setVerticalGroup(
-                       gl_contentPane.createParallelGroup(Alignment.LEADING)
-                               .addGroup(gl_contentPane.createSequentialGroup()
-                                       .addGap(62)
-                                       .addComponent(btnAdd, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE)
-                                       .addGap(58)
-                                       .addComponent(btnDel, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE)
-                                       .addContainerGap(142, Short.MAX_VALUE))
-               );
-               contentPane.setLayout(gl_contentPane);
+               
+               JButton btnOwneraddition = new JButton("OwnerAddition");
+               btnOwneraddition.setBounds(120, 243, 164, 73);
+               btnOwneraddition.addActionListener(new ActionListener() {
+                       public void actionPerformed(ActionEvent e) {
+                               Frame a = new listOfOwnerAddittionRequests();
+                               a.setVisible(true);
+                       }
+               });
+               contentPane.setLayout(null);
+               contentPane.add(btnOwneraddition);
+               contentPane.add(btnDel);
+               contentPane.add(btnAdd);
+       
+               JButton btnOwnerDeletion = new JButton("Owner Deletion");
+               btnOwnerDeletion.setBounds(120, 331, 164, 73);
+               btnOwnerDeletion.addActionListener(new ActionListener() {
+                       public void actionPerformed(ActionEvent e) {
+                               Frame a = new DeleteOwnerGUI();
+                               a.setVisible(true);
+                       }
+               });
+               contentPane.add(btnOwnerDeletion);
        }
-
 }