Started creating the booking interface for the owners.
[RRRRHHHH_Code] / ruralHouses / src / gui / listOfAdditionRequestsGUI.java
index db65fb2..cd501b5 100644 (file)
@@ -97,8 +97,23 @@ public class listOfAdditionRequestsGUI extends JFrame {
                                }
                        }
                });
                                }
                        }
                });
-               btnNewButton.setBounds(301, 394, 169, 25);
+               btnNewButton.setBounds(88, 396, 169, 25);
                contentPane.add(btnNewButton);
                contentPane.add(btnNewButton);
+               
+               JButton btnDenyAddition = new JButton("Deny Addition");
+               btnDenyAddition.addActionListener(new ActionListener() {
+                       public void actionPerformed(ActionEvent arg0) {
+                               if (table.getRowCount()!=0 && table.getSelectedRow() != -1) {
+                                       RuralHouse rh = houses.get(table.getSelectedRow());
+                                       am.removeHouseAdditionRequests(rh);
+                                       Administrator.saveInstance();
+                                       ((DefaultTableModel)table.getModel()).removeRow(houses.indexOf(rh));
+                                       houses.remove(rh);
+                               }
+                       }
+               });
+               btnDenyAddition.setBounds(300, 396, 169, 25);
+               contentPane.add(btnDenyAddition);
                Enumeration<RuralHouse> en = houses.elements();
                RuralHouse rh;
                
                Enumeration<RuralHouse> en = houses.elements();
                RuralHouse rh;