Initial commit + Interfaccia base
This commit is contained in:
184
src/guimybank/GUIMyBank.form
Normal file
184
src/guimybank/GUIMyBank.form
Normal file
@@ -0,0 +1,184 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
|
||||
<Form version="1.3" maxVersion="1.9" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
|
||||
<Properties>
|
||||
<Property name="defaultCloseOperation" type="int" value="3"/>
|
||||
</Properties>
|
||||
<SyntheticProperties>
|
||||
<SyntheticProperty name="formSizePolicy" type="int" value="1"/>
|
||||
<SyntheticProperty name="generateCenter" type="boolean" value="false"/>
|
||||
</SyntheticProperties>
|
||||
<AuxValues>
|
||||
<AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
|
||||
<AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
|
||||
<AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
|
||||
<AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="3"/>
|
||||
<AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
|
||||
<AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
|
||||
</AuxValues>
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lblNome" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblCognome" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblCodiceFiscale" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="26" max="-2" attributes="0"/>
|
||||
<Component id="txtCodiceFiscale" min="-2" pref="115" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="28" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Component id="txtCognome" pref="113" max="32767" attributes="0"/>
|
||||
<Component id="txtNome" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lblDataDiNascita" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblSaldoIniziale" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="18" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="txtDataDiNascita" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Component id="btnDataDiNascita" min="-2" pref="39" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="txtSaldoIniziale" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="37" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="btnVersamento" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnPrelievo" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnListaMovimenti" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="99" max="-2" attributes="0"/>
|
||||
<Component id="btnAprireContoCorrente" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<EmptySpace min="-2" pref="14" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lblNome" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtNome" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="unrelated" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lblCognome" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtCognome" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnVersamento" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lblCodiceFiscale" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtCodiceFiscale" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnPrelievo" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lblDataDiNascita" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtDataDiNascita" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnDataDiNascita" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnListaMovimenti" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lblSaldoIniziale" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtSaldoIniziale" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="btnAprireContoCorrente" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace pref="58" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JLabel" name="lblNome">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Nome"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblCognome">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Cognome"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblCodiceFiscale">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Codice fiscale"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblDataDiNascita">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Data di nascita"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JLabel" name="lblSaldoIniziale">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Saldo iniziale"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<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 class="javax.swing.JTextField" name="txtCognome">
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtCodiceFiscale">
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtDataDiNascita">
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtSaldoIniziale">
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnDataDiNascita">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="[]"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnAprireContoCorrente">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Aprire conto corrente"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnVersamento">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Versamento"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnPrelievo">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Prelievo"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnListaMovimenti">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Lista movimenti"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
194
src/guimybank/GUIMyBank.java
Normal file
194
src/guimybank/GUIMyBank.java
Normal file
@@ -0,0 +1,194 @@
|
||||
/*
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
* Click nbfs://nbhost/SystemFileSystem/Templates/GUIForms/JFrame.java to edit this template
|
||||
*/
|
||||
package guimybank;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Verde
|
||||
*/
|
||||
public class GUIMyBank extends javax.swing.JFrame {
|
||||
|
||||
private static final java.util.logging.Logger logger = java.util.logging.Logger.getLogger(GUIMyBank.class.getName());
|
||||
|
||||
/**
|
||||
* Creates new form GUIMyBank
|
||||
*/
|
||||
public GUIMyBank() {
|
||||
initComponents();
|
||||
btnVersamento.setVisible(false);
|
||||
btnPrelievo.setVisible(false);
|
||||
btnListaMovimenti.setVisible(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called from within the constructor to initialize the form.
|
||||
* WARNING: Do NOT modify this code. The content of this method is always
|
||||
* regenerated by the Form Editor.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||
private void initComponents() {
|
||||
|
||||
lblNome = new javax.swing.JLabel();
|
||||
lblCognome = new javax.swing.JLabel();
|
||||
lblCodiceFiscale = new javax.swing.JLabel();
|
||||
lblDataDiNascita = new javax.swing.JLabel();
|
||||
lblSaldoIniziale = new javax.swing.JLabel();
|
||||
txtNome = new javax.swing.JTextField();
|
||||
txtCognome = new javax.swing.JTextField();
|
||||
txtCodiceFiscale = new javax.swing.JTextField();
|
||||
txtDataDiNascita = new javax.swing.JTextField();
|
||||
txtSaldoIniziale = new javax.swing.JTextField();
|
||||
btnDataDiNascita = new javax.swing.JButton();
|
||||
btnAprireContoCorrente = new javax.swing.JButton();
|
||||
btnVersamento = new javax.swing.JButton();
|
||||
btnPrelievo = new javax.swing.JButton();
|
||||
btnListaMovimenti = new javax.swing.JButton();
|
||||
|
||||
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||||
|
||||
lblNome.setText("Nome");
|
||||
|
||||
lblCognome.setText("Cognome");
|
||||
|
||||
lblCodiceFiscale.setText("Codice fiscale");
|
||||
|
||||
lblDataDiNascita.setText("Data di nascita");
|
||||
|
||||
lblSaldoIniziale.setText("Saldo iniziale");
|
||||
|
||||
txtNome.addActionListener(this::txtNomeActionPerformed);
|
||||
|
||||
btnDataDiNascita.setText("[]");
|
||||
|
||||
btnAprireContoCorrente.setText("Aprire conto corrente");
|
||||
|
||||
btnVersamento.setText("Versamento");
|
||||
|
||||
btnPrelievo.setText("Prelievo");
|
||||
|
||||
btnListaMovimenti.setText("Lista movimenti");
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(17, 17, 17)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lblNome)
|
||||
.addComponent(lblCognome)
|
||||
.addComponent(lblCodiceFiscale))
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(26, 26, 26)
|
||||
.addComponent(txtCodiceFiscale, javax.swing.GroupLayout.PREFERRED_SIZE, 115, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addComponent(txtCognome, javax.swing.GroupLayout.DEFAULT_SIZE, 113, Short.MAX_VALUE)
|
||||
.addComponent(txtNome)))))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(lblDataDiNascita)
|
||||
.addComponent(lblSaldoIniziale))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addComponent(txtDataDiNascita, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addComponent(btnDataDiNascita, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addComponent(txtSaldoIniziale))))
|
||||
.addGap(37, 37, 37)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(btnVersamento)
|
||||
.addComponent(btnPrelievo)
|
||||
.addComponent(btnListaMovimenti))
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(99, 99, 99)
|
||||
.addComponent(btnAprireContoCorrente)
|
||||
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
|
||||
);
|
||||
layout.setVerticalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addGroup(layout.createSequentialGroup()
|
||||
.addGap(14, 14, 14)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(lblNome)
|
||||
.addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(lblCognome)
|
||||
.addComponent(txtCognome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnVersamento))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(lblCodiceFiscale)
|
||||
.addComponent(txtCodiceFiscale, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnPrelievo))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(lblDataDiNascita)
|
||||
.addComponent(txtDataDiNascita, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
|
||||
.addComponent(btnDataDiNascita)
|
||||
.addComponent(btnListaMovimenti))
|
||||
.addGap(18, 18, 18)
|
||||
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
||||
.addComponent(lblSaldoIniziale)
|
||||
.addComponent(txtSaldoIniziale, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
|
||||
.addGap(18, 18, 18)
|
||||
.addComponent(btnAprireContoCorrente)
|
||||
.addContainerGap(58, Short.MAX_VALUE))
|
||||
);
|
||||
|
||||
pack();
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
/**
|
||||
* @param args the command line arguments
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
/* Set the Nimbus look and feel */
|
||||
//<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
|
||||
/* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
|
||||
* For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
|
||||
*/
|
||||
try {
|
||||
for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
|
||||
if ("Nimbus".equals(info.getName())) {
|
||||
javax.swing.UIManager.setLookAndFeel(info.getClassName());
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (ReflectiveOperationException | javax.swing.UnsupportedLookAndFeelException ex) {
|
||||
logger.log(java.util.logging.Level.SEVERE, null, ex);
|
||||
}
|
||||
//</editor-fold>
|
||||
|
||||
/* Create and display the form */
|
||||
java.awt.EventQueue.invokeLater(() -> new GUIMyBank().setVisible(true));
|
||||
}
|
||||
|
||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||
private javax.swing.JButton btnAprireContoCorrente;
|
||||
private javax.swing.JButton btnDataDiNascita;
|
||||
private javax.swing.JButton btnListaMovimenti;
|
||||
private javax.swing.JButton btnPrelievo;
|
||||
private javax.swing.JButton btnVersamento;
|
||||
private javax.swing.JLabel lblCodiceFiscale;
|
||||
private javax.swing.JLabel lblCognome;
|
||||
private javax.swing.JLabel lblDataDiNascita;
|
||||
private javax.swing.JLabel lblNome;
|
||||
private javax.swing.JLabel lblSaldoIniziale;
|
||||
private javax.swing.JTextField txtCodiceFiscale;
|
||||
private javax.swing.JTextField txtCognome;
|
||||
private javax.swing.JTextField txtDataDiNascita;
|
||||
private javax.swing.JTextField txtNome;
|
||||
private javax.swing.JTextField txtSaldoIniziale;
|
||||
// End of variables declaration//GEN-END:variables
|
||||
}
|
||||
Reference in New Issue
Block a user