Versamento

This commit is contained in:
La Programmatrice Verde
2026-02-17 18:15:51 +01:00
parent f0e0d493d0
commit c3a3c11c66
9 changed files with 33 additions and 0 deletions

View File

@@ -20,6 +20,7 @@ import javax.swing.border.LineBorder;
public class GUIMyBank extends javax.swing.JFrame {
static Border borderOriginale = UIManager.getBorder("TextField.border");
static ContoCorrente contoCorrente;
private static final java.util.logging.Logger logger = java.util.logging.Logger
.getLogger(GUIMyBank.class.getName());
@@ -219,6 +220,8 @@ txtCognome.setBorder(borderOriginale);
if (!isNumeroValid(versamento)) {
JOptionPane.showMessageDialog(null, "L'importo che si desidera versare non è valido.");
error = true;
} else {
contoCorrente.versa(Double.parseDouble(versamento));
}
} while (error);
}//GEN-LAST:event_btnVersamentoActionPerformed
@@ -272,6 +275,8 @@ txtCognome.setBorder(borderOriginale);
return;
}
contoCorrente = new ContoCorrente(nome, cognome, codiceFiscale, Double.parseDouble(saldoIniziale));
btnVersamento.setVisible(true);
btnPrelievo.setVisible(true);
btnListaMovimenti.setVisible(true);