Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard

Diff Revisions dd0098 ... vs d7fd17 ... for ruralHouses/src/gui/listOfAdditionRequestsGUI.java

Diff revisions: vs.
  @@ -97,8 +97,23 @@
97 97 }
98 98 }
99 99 });
100 - btnNewButton.setBounds(301, 394, 169, 25);
100 + btnNewButton.setBounds(88, 396, 169, 25);
101 101 contentPane.add(btnNewButton);
102 +
103 + JButton btnDenyAddition = new JButton("Deny Addition");
104 + btnDenyAddition.addActionListener(new ActionListener() {
105 + public void actionPerformed(ActionEvent arg0) {
106 + if (table.getRowCount()!=0 && table.getSelectedRow() != -1) {
107 + RuralHouse rh = houses.get(table.getSelectedRow());
108 + am.removeHouseAdditionRequests(rh);
109 + Administrator.saveInstance();
110 + ((DefaultTableModel)table.getModel()).removeRow(houses.indexOf(rh));
111 + houses.remove(rh);
112 + }
113 + }
114 + });
115 + btnDenyAddition.setBounds(300, 396, 169, 25);
116 + contentPane.add(btnDenyAddition);
102 117 Enumeration<RuralHouse> en = houses.elements();
103 118 RuralHouse rh;
104 119