Merge branch 'master' of https://xp-dev.com/git/RRRRHHHH_Code
[RRRRHHHH_Code] / ruralHouses / src / gui / listOfAdditionRequestsGUI.java
index 2829bc1..0fbf336 100644 (file)
@@ -24,6 +24,10 @@ import domain.RuralHouse;
 
 public class listOfAdditionRequestsGUI extends JFrame {
 
+       /**
+        * 
+        */
+       private static final long serialVersionUID = 1L;
        private JPanel contentPane;
        private JTable table;
        private DefaultTableModel tableModel;
@@ -86,10 +90,10 @@ public class listOfAdditionRequestsGUI extends JFrame {
                                        RuralHouse rh = houses.get(table.getSelectedRow());
                                        //TODO when the house is not added show a warning to the user. Method below returns a boolean stating that.
                                        hm.registerNewHouse(rh);
-                                       houses.remove(rh);
                                        am.removeHouseAdditionRequests(rh);
                                        Administrator.saveInstance();
                                        ((DefaultTableModel)table.getModel()).removeRow(houses.indexOf(rh));
+                                       houses.remove(rh);
                                }
                        }
                });