diff --git a/src/main/java/org/isf/medicalstockward/gui/WardPharmacy.java b/src/main/java/org/isf/medicalstockward/gui/WardPharmacy.java index 587ad2a2d0..eaeee96f85 100644 --- a/src/main/java/org/isf/medicalstockward/gui/WardPharmacy.java +++ b/src/main/java/org/isf/medicalstockward/gui/WardPharmacy.java @@ -783,8 +783,7 @@ public void focusLost(FocusEvent e) { weightFrom = Integer.parseInt(jWeightFromTextField.getText()); if (weightTo < 0 || weightTo > 200) { jWeightToTextField.setText(""); //$NON-NLS-1$ - JOptionPane - .showMessageDialog(WardPharmacy.this, MessageBundle.getMessage("angal.medicalstockward.insertavalidweight")); //$NON-NLS-1$ + MessageDialog.error(WardPharmacy.this, "angal.medicalstockward.insertavalidweight"); } } catch (NumberFormatException ex) { jWeightToTextField.setText("0"); //$NON-NLS-1$ @@ -813,7 +812,7 @@ public void focusLost(FocusEvent e) { weightTo = Integer.parseInt(jWeightToTextField.getText()); if (weightFrom < 0) { jWeightFromTextField.setText(""); - JOptionPane.showMessageDialog(WardPharmacy.this, MessageBundle.getMessage("angal.medicalstockward.insertavalidweight")); + MessageDialog.error(WardPharmacy.this, "angal.medicalstockward.insertavalidweight"); } } catch (NumberFormatException ex) { jWeightFromTextField.setText("0"); diff --git a/src/main/java/org/isf/medicalstockward/gui/WardPharmacyRectify.java b/src/main/java/org/isf/medicalstockward/gui/WardPharmacyRectify.java index 7264a6f36e..bdc0a51b6f 100644 --- a/src/main/java/org/isf/medicalstockward/gui/WardPharmacyRectify.java +++ b/src/main/java/org/isf/medicalstockward/gui/WardPharmacyRectify.java @@ -376,7 +376,7 @@ private void initComponents() { double movQuantity = lotQty - newQty; if (movQuantity == 0. || newQty < 0) { - JOptionPane.showMessageDialog(this, MessageBundle.getMessage("angal.medicalstockward.rectify.pleaseinsertavalidvalue")); + MessageDialog.error(this, "angal.medicalstockward.rectify.pleaseinsertavalidvalue"); return; } if (newQty == 0.) { diff --git a/src/main/java/org/isf/priceslist/gui/ListBrowser.java b/src/main/java/org/isf/priceslist/gui/ListBrowser.java index 898c481497..00ec407d66 100644 --- a/src/main/java/org/isf/priceslist/gui/ListBrowser.java +++ b/src/main/java/org/isf/priceslist/gui/ListBrowser.java @@ -116,7 +116,7 @@ private JButton getJButtonDelete() { jButtonDelete.setMnemonic(MessageBundle.getMnemonic("angal.common.delete.btn.key")); jButtonDelete.addActionListener(actionEvent -> { if (jTablePriceLists.getSelectedRow() < 0) { - JOptionPane.showMessageDialog(null, MessageBundle.getMessage("angal.priceslist.pleaseselectalisttodelete")); + MessageDialog.error(null, "angal.priceslist.pleaseselectalisttodelete"); } else { if (jTablePriceLists.getRowCount() == 1) { MessageDialog.error(null, "angal.priceslist.sorryatleastonelist");