Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard

Diff Revisions fca164 ... vs 85d983 ... for ruralHouses client/src/gui/DeleteOfferGUI.java

Diff revisions: vs.
  @@ -5,6 +5,7 @@
5 5 import java.awt.event.ItemEvent;
6 6 import java.awt.event.ItemListener;
7 7 import java.rmi.Naming;
8 + import java.rmi.RemoteException;
8 9 import java.util.Vector;
9 10
10 11 import javax.swing.JButton;
  @@ -15,8 +16,8 @@
15 16 import javax.swing.JRadioButton;
16 17 import javax.swing.border.EmptyBorder;
17 18
19 + import common.HouseInterface;
18 20 import common.OfferInterface;
19 -
20 21 import configuration.___IntNames;
21 22 import domain.Offer;
22 23 import domain.Owner;
  @@ -29,23 +30,35 @@
29 30 */
30 31 private static final long serialVersionUID = 1L;
31 32 private JPanel contentPane;
32 - private Owner owner;
33 33 private JLabel feedback;
34 34 private JComboBox<RuralHouse> comboBox;
35 35 private JComboBox<Offer> comboBox_1;
36 36 private JButton btnDelete;
37 + private Vector<RuralHouse> Hlist = null;
38 + private HouseInterface hm = null;
37 39
38 40 /**
39 41 * Create the frame.
40 42 */
41 43 public DeleteOfferGUI(Owner o) {
42 - this.owner = o;
44 + try {
45 + hm = (HouseInterface) Naming
46 + .lookup(___IntNames.HouseManager);
47 + } catch (Exception e1) {
48 + System.out.println("Error accessing remote authentication: "
49 + + e1.toString());
50 + }
51 + try {
52 + Hlist = hm.getHouses(o, null, null, 0, 0, 0, 0, 0);
53 + } catch (RemoteException e1) {
54 + e1.printStackTrace();
55 + }
43 56 setBounds(100, 100, 450, 300);
44 57 contentPane = new JPanel();
45 58 contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
46 59 setContentPane(contentPane);
47 60
48 - comboBox = new JComboBox<RuralHouse>(this.owner.getRuralHouses());
61 + comboBox = new JComboBox<RuralHouse>(this.Hlist);
49 62 comboBox.setBounds(101, 38, 314, 20);
50 63
51 64 comboBox_1 = new JComboBox<Offer>();