UX apertura conto corrente
This commit is contained in:
Binary file not shown.
@@ -143,9 +143,6 @@
|
|||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JTextField" name="txtNome">
|
<Component class="javax.swing.JTextField" name="txtNome">
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtNomeActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JTextField" name="txtCognome">
|
<Component class="javax.swing.JTextField" name="txtCognome">
|
||||||
</Component>
|
</Component>
|
||||||
@@ -164,6 +161,9 @@
|
|||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" value="Aprire conto corrente"/>
|
<Property name="text" type="java.lang.String" value="Aprire conto corrente"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnAprireContoCorrenteActionPerformed"/>
|
||||||
|
</Events>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JButton" name="btnVersamento">
|
<Component class="javax.swing.JButton" name="btnVersamento">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
|||||||
@@ -143,9 +143,6 @@
|
|||||||
</Properties>
|
</Properties>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JTextField" name="txtNome">
|
<Component class="javax.swing.JTextField" name="txtNome">
|
||||||
<Events>
|
|
||||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="txtNomeActionPerformed"/>
|
|
||||||
</Events>
|
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JTextField" name="txtCognome">
|
<Component class="javax.swing.JTextField" name="txtCognome">
|
||||||
</Component>
|
</Component>
|
||||||
@@ -164,6 +161,9 @@
|
|||||||
<Properties>
|
<Properties>
|
||||||
<Property name="text" type="java.lang.String" value="Aprire conto corrente"/>
|
<Property name="text" type="java.lang.String" value="Aprire conto corrente"/>
|
||||||
</Properties>
|
</Properties>
|
||||||
|
<Events>
|
||||||
|
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnAprireContoCorrenteActionPerformed"/>
|
||||||
|
</Events>
|
||||||
</Component>
|
</Component>
|
||||||
<Component class="javax.swing.JButton" name="btnVersamento">
|
<Component class="javax.swing.JButton" name="btnVersamento">
|
||||||
<Properties>
|
<Properties>
|
||||||
|
|||||||
@@ -4,6 +4,11 @@
|
|||||||
*/
|
*/
|
||||||
package guimybank;
|
package guimybank;
|
||||||
|
|
||||||
|
import java.awt.Color;
|
||||||
|
import javax.swing.JOptionPane;
|
||||||
|
import javax.swing.border.Border;
|
||||||
|
import javax.swing.border.LineBorder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Verde
|
* @author Verde
|
||||||
@@ -59,11 +64,10 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
|
|
||||||
lblSaldoIniziale.setText("Saldo iniziale");
|
lblSaldoIniziale.setText("Saldo iniziale");
|
||||||
|
|
||||||
txtNome.addActionListener(this::txtNomeActionPerformed);
|
|
||||||
|
|
||||||
btnDataDiNascita.setText("[]");
|
btnDataDiNascita.setText("[]");
|
||||||
|
|
||||||
btnAprireContoCorrente.setText("Aprire conto corrente");
|
btnAprireContoCorrente.setText("Aprire conto corrente");
|
||||||
|
btnAprireContoCorrente.addActionListener(this::btnAprireContoCorrenteActionPerformed);
|
||||||
|
|
||||||
btnVersamento.setText("Versamento");
|
btnVersamento.setText("Versamento");
|
||||||
|
|
||||||
@@ -149,6 +153,51 @@ public class GUIMyBank extends javax.swing.JFrame {
|
|||||||
pack();
|
pack();
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
|
private void btnAprireContoCorrenteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnAprireContoCorrenteActionPerformed
|
||||||
|
String nome = txtNome.getText();
|
||||||
|
String cognome = txtCognome.getText();
|
||||||
|
String codiceFiscale = txtCodiceFiscale.getText();
|
||||||
|
String dataDiNascita = txtDataDiNascita.getText();
|
||||||
|
String saldoIniziale = txtSaldoIniziale.getText();
|
||||||
|
|
||||||
|
if(nome.isEmpty()){
|
||||||
|
JOptionPane.showMessageDialog(null, "Inserire il proprio nome.");
|
||||||
|
txtNome.setBorder(new LineBorder(Color.red));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if(cognome.isEmpty()){
|
||||||
|
JOptionPane.showMessageDialog(null, "Inserire il proprio cognome.");
|
||||||
|
txtCognome.setBorder(new LineBorder(Color.red));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//TODO: verifica codice fiscale
|
||||||
|
if(codiceFiscale.isEmpty()){
|
||||||
|
JOptionPane.showMessageDialog(null, "Inserire il proprio codice fiscale.");
|
||||||
|
txtCodiceFiscale.setBorder(new LineBorder(Color.red));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
//TODO: gestione data
|
||||||
|
//if(dataDiNascita.isEmpty()){
|
||||||
|
// JOptionPane.showMessageDialog(null, "Inserire la propria data di nascita.");
|
||||||
|
// txtDataDiNascita.setBorder(new LineBorder(Color.red));
|
||||||
|
// return;
|
||||||
|
//}
|
||||||
|
if(saldoIniziale.isEmpty()){
|
||||||
|
JOptionPane.showMessageDialog(null, "Inserire il proprio saldo iniziale.");
|
||||||
|
txtSaldoIniziale.setBorder(new LineBorder(Color.red));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
btnVersamento.setVisible(true);
|
||||||
|
btnPrelievo.setVisible(true);
|
||||||
|
btnListaMovimenti.setVisible(true);
|
||||||
|
txtNome.setEditable(false);
|
||||||
|
txtCognome.setEditable(false);
|
||||||
|
txtCodiceFiscale.setEditable(false);
|
||||||
|
txtDataDiNascita.setEditable(false);
|
||||||
|
txtSaldoIniziale.setEditable(false);
|
||||||
|
|
||||||
|
}//GEN-LAST:event_btnAprireContoCorrenteActionPerformed
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param args the command line arguments
|
* @param args the command line arguments
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user