|
@@ -12,6 +12,7 @@ |
12 |
12 |
|
import javax.swing.border.EmptyBorder; |
13 |
13 |
|
|
14 |
14 |
|
import domain.Owner; |
|
15 |
+ |
import javax.swing.LayoutStyle.ComponentPlacement; |
15 |
16 |
|
|
16 |
17 |
|
public class OwnerMenuGUI extends JFrame { |
17 |
18 |
|
|
|
@@ -42,7 +43,7 @@ |
42 |
43 |
|
a.setVisible(true); |
43 |
44 |
|
} |
44 |
45 |
|
}); |
45 |
|
- |
|
|
46 |
+ |
|
46 |
47 |
|
JButton btnOffers = new JButton("Offers"); |
47 |
48 |
|
btnOffers.addActionListener(new ActionListener() { |
48 |
49 |
|
public void actionPerformed(ActionEvent e) { |
|
@@ -50,14 +51,23 @@ |
50 |
51 |
|
a.setVisible(true); |
51 |
52 |
|
} |
52 |
53 |
|
}); |
|
54 |
+ |
|
|
55 |
+ |
JButton btnBookings = new JButton("Bookings"); |
|
56 |
+ |
btnBookings.addActionListener(new ActionListener() { |
|
57 |
+ |
public void actionPerformed(ActionEvent e) { |
|
58 |
+ |
Frame a = new listOfBookingRequestsGUI(owner); |
|
59 |
+ |
a.setVisible(true); |
|
60 |
+ |
} |
|
61 |
+ |
}); |
53 |
62 |
|
GroupLayout gl_contentPane = new GroupLayout(contentPane); |
54 |
63 |
|
gl_contentPane.setHorizontalGroup( |
55 |
64 |
|
gl_contentPane.createParallelGroup(Alignment.LEADING) |
56 |
65 |
|
.addGroup(gl_contentPane.createSequentialGroup() |
57 |
66 |
|
.addGap(115) |
58 |
|
- |
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING) |
59 |
|
- |
.addComponent(btnOffers, GroupLayout.PREFERRED_SIZE, 164, GroupLayout.PREFERRED_SIZE) |
60 |
|
- |
.addComponent(btnHouses, GroupLayout.PREFERRED_SIZE, 164, GroupLayout.PREFERRED_SIZE)) |
|
67 |
+ |
.addGroup(gl_contentPane.createParallelGroup(Alignment.LEADING, false) |
|
68 |
+ |
.addComponent(btnBookings, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) |
|
69 |
+ |
.addComponent(btnOffers, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE) |
|
70 |
+ |
.addComponent(btnHouses, Alignment.TRAILING, GroupLayout.DEFAULT_SIZE, 164, Short.MAX_VALUE)) |
61 |
71 |
|
.addContainerGap(145, Short.MAX_VALUE)) |
62 |
72 |
|
); |
63 |
73 |
|
gl_contentPane.setVerticalGroup( |
|
@@ -67,7 +77,9 @@ |
67 |
77 |
|
.addComponent(btnHouses, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE) |
68 |
78 |
|
.addGap(58) |
69 |
79 |
|
.addComponent(btnOffers, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE) |
70 |
|
- |
.addContainerGap(142, Short.MAX_VALUE)) |
|
80 |
+ |
.addPreferredGap(ComponentPlacement.RELATED, 50, Short.MAX_VALUE) |
|
81 |
+ |
.addComponent(btnBookings, GroupLayout.PREFERRED_SIZE, 81, GroupLayout.PREFERRED_SIZE) |
|
82 |
+ |
.addContainerGap()) |
71 |
83 |
|
); |
72 |
84 |
|
contentPane.setLayout(gl_contentPane); |
73 |
85 |
|
} |