From 2d18a7085c2cc4301baa66a18b51ec0d26f2b77e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9A=D0=B0=D1=88=D0=B8=D0=BD=20=D0=9C=D0=B0=D0=BA=D1=81?= =?UTF-8?q?=D0=B8=D0=BC?= Date: Wed, 16 Nov 2022 10:30:07 +0400 Subject: [PATCH] fix 03 --- src/FormGasolineTanker.java | 2 +- src/FormMapWithSetGasolineTanker.java | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/FormGasolineTanker.java b/src/FormGasolineTanker.java index 04e1085..adba354 100644 --- a/src/FormGasolineTanker.java +++ b/src/FormGasolineTanker.java @@ -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() { diff --git a/src/FormMapWithSetGasolineTanker.java b/src/FormMapWithSetGasolineTanker.java index fd26dc7..e07db24 100644 --- a/src/FormMapWithSetGasolineTanker.java +++ b/src/FormMapWithSetGasolineTanker.java @@ -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); } });