Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard

Diff Revisions 8012b0 ... vs 076d76 ... for ruralHouses client/src/gui/OffersRelatedOwnerGUI.java

Diff revisions: vs.
  @@ -3,6 +3,8 @@
3 3 import java.awt.Frame;
4 4 import java.awt.event.ActionEvent;
5 5 import java.awt.event.ActionListener;
6 + import java.rmi.Naming;
7 + import java.rmi.RemoteException;
6 8
7 9 import javax.swing.GroupLayout;
8 10 import javax.swing.GroupLayout.Alignment;
  @@ -11,6 +13,9 @@
11 13 import javax.swing.JPanel;
12 14 import javax.swing.border.EmptyBorder;
13 15
16 + import common.HouseInterface;
17 +
18 + import configuration.___IntNames;
14 19 import domain.Owner;
15 20
16 21 public class OffersRelatedOwnerGUI extends JFrame {
  @@ -35,7 +40,21 @@
35 40 JButton btnCreateOffers = new JButton("Create Offers");
36 41 btnCreateOffers.addActionListener(new ActionListener() {
37 42 public void actionPerformed(ActionEvent arg0) {
38 - Frame a = new AddOffersGUI(owner.getRuralHouses());
43 + HouseInterface houseM=null;
44 + try {
45 + houseM = (HouseInterface) Naming
46 + .lookup(___IntNames.HouseManager);
47 + } catch (Exception e1) {
48 + System.out.println("Error accessing remote authentication: "
49 + + e1.toString());
50 + }
51 + Frame a = null;
52 + try {
53 + a = new AddOffersGUI(houseM.getHouses(owner, null, null, 0, 0, 0, 0, 0));
54 + } catch (RemoteException e) {
55 + // TODO Auto-generated catch block
56 + e.printStackTrace();
57 + }
39 58 a.setVisible(true);
40 59 }
41 60 });