Git Repository Public Repository

RRRRHHHH_Code

URLs

Copy to Clipboard

Diff Revisions 4bc36b ... vs 85d983 ... for ruralHouses client/src/gui/listOfBookingRequestsGUI.java

Diff revisions: vs.
  @@ -67,11 +67,6 @@
67 67 lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 27));
68 68 lblNewLabel.setBounds(23, 41, 536, 33);
69 69 contentPane.add(lblNewLabel);
70 - if (bookings.isEmpty())
71 - lblNewLabel
72 - .setText("There are not bookings to be confirmed or denied");
73 - else
74 - lblNewLabel.setText("List of bookings:");
75 70 JScrollPane scrollPane = new JScrollPane();
76 71 scrollPane.setBounds(new Rectangle(45, 305, 320, 116));
77 72 scrollPane.setBounds(23, 113, 536, 271);
  @@ -141,16 +136,22 @@
141 136 }
142 137 ((DefaultTableModel) table.getModel()).removeRow(table
143 138 .getSelectedRow());
139 + bookings.remove(book);
144 140
145 141 }
146 142 }
147 143 });
148 -
149 - if (this.bookings.get(0).getOffer().isBooked()) {
150 - btnDenyAddition.setEnabled(false);
151 - btnNewButton.setEnabled(false);
144 + if (bookings.isEmpty())
145 + lblNewLabel
146 + .setText("There are not bookings to be confirmed or denied");
147 + else {
148 + lblNewLabel.setText("List of bookings:");
149 + if (this.bookings.get(0).getOffer().isBooked()) {
150 + btnDenyAddition.setEnabled(false);
151 + btnNewButton.setEnabled(false);
152 + }
152 153 }
153 -
154 +
154 155 btnDenyAddition.setBounds(390, 395, 169, 25);
155 156 contentPane.add(btnDenyAddition);
156 157