This commit is contained in:
Кашин Максим 2022-11-16 10:30:07 +04:00
parent 2035ffd79d
commit 2d18a7085c
2 changed files with 7 additions and 7 deletions

View File

@ -71,7 +71,7 @@ public class FormGasolineTanker extends JFrame{
});
ButtonSelect.addActionListener(e -> {
SelectedGasolineTanker=field.GetDrawingGasolineTanker();
JOptionPane.showMessageDialog(PictureBox, "Корабль добавлен.");
JOptionPane.showMessageDialog(PictureBox, "Gasoline tanker added.");
});
addComponentListener(new ComponentAdapter() {

View File

@ -86,11 +86,11 @@ public class FormMapWithSetGasolineTanker extends JFrame{
DrawingObjectGasolineTanker gasolineTanker = new DrawingObjectGasolineTanker(dialog.getSelectedGasolineTanker());
if (_mapGasolineTankerCollectionGeneric.plus(gasolineTanker) >= 0) {
JOptionPane.showMessageDialog(this, "Объект добавлен", "Успех", JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(this, "\n" + "Object added", "Success", JOptionPane.INFORMATION_MESSAGE);
bufferedImage = _mapGasolineTankerCollectionGeneric.ShowSet();
repaint();
} else {
JOptionPane.showMessageDialog(this, "Не удалось добавить объект", "Ошибка",JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(this, "Failed to add object", "Error",JOptionPane.INFORMATION_MESSAGE);
}
}
});
@ -103,8 +103,8 @@ public class FormMapWithSetGasolineTanker extends JFrame{
}
int result = JOptionPane.showConfirmDialog(
this,
"Удалить объект?",
"Удаление",
"Delete object?",
"Delete",
JOptionPane.YES_NO_CANCEL_OPTION);
if (result == JOptionPane.NO_OPTION)
{
@ -113,13 +113,13 @@ public class FormMapWithSetGasolineTanker extends JFrame{
int pos = Integer.parseInt(txt);
if (_mapGasolineTankerCollectionGeneric.minus(pos) !=null)
{
JOptionPane.showMessageDialog(this,"Объект удален","Успех",JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(this,"Object added", "Success",JOptionPane.INFORMATION_MESSAGE);
bufferedImage = _mapGasolineTankerCollectionGeneric.ShowSet();
repaint();
}
else
{
JOptionPane.showMessageDialog(this,"Не удалось удалить объект","Ошибка",JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(this,"Failed to add object", "Error",JOptionPane.INFORMATION_MESSAGE);
}
});