}
}
});
- btnNewButton.setBounds(301, 394, 169, 25);
+ btnNewButton.setBounds(88, 396, 169, 25);
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;