Исправления

This commit is contained in:
111 2022-11-08 16:07:16 +04:00
parent 660ee2abb3
commit 0dcc62e3b2

View File

@ -202,9 +202,13 @@ public class FormMapWithArmoredCars extends JFrame{
lookDeletedButton.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
FormArmoredCar form = new FormArmoredCar();
if (!queue.isEmpty())
form.setArmoredCar(queue.peek().getArmoredCar());
if (!queue.isEmpty()) {
FormArmoredCar form = new FormArmoredCar();
form.setArmoredCar(queue.poll().getArmoredCar());
}
else
JOptionPane.showMessageDialog(null, "Нет удаленных объектов");
}
});
}