Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard

Diff Revisions e90cb4 ... vs 4bc36b ... for ruralHouses client/src/gui/ModifyHouseGUI.java

Diff revisions: vs.
  @@ -6,6 +6,7 @@
6 6 import java.awt.event.ItemListener;
7 7 import java.rmi.Naming;
8 8 import java.rmi.RemoteException;
9 + import java.util.Vector;
9 10
10 11 import javax.swing.DefaultComboBoxModel;
11 12 import javax.swing.JButton;
  @@ -159,8 +160,22 @@
159 160
160 161 }
161 162 });
162 -
163 - houseBox = new JComboBox<RuralHouse>(o.getRuralHouses());
163 + HouseInterface hm= null;
164 + try {
165 + hm = (HouseInterface) Naming
166 + .lookup(___IntNames.HouseManager);
167 + } catch (Exception e1) {
168 + System.out.println("Error accessing remote authentication: "
169 + + e1.toString());
170 + }
171 + Vector<RuralHouse> list = null;
172 + try {
173 + list = hm.getHouses(o, null, null, 0, 0, 0, 0, 0);
174 + } catch (RemoteException e1) {
175 + e1.printStackTrace();
176 + }
177 +
178 + houseBox = new JComboBox<RuralHouse>(list);
164 179 if (!o.getRuralHouses().isEmpty()) {
165 180 rh = (RuralHouse) houseBox.getSelectedItem();
166 181 comboBox.setSelectedItem(rh.getDistrict());