diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 0000000..8b75a53 --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,9 @@ + + + + + + file:/home/Verde/git/RegistrazionePalestra/src/registrazionepalestra/RegistrazionePalestra.java + + + diff --git a/src/registrazionepalestra/RegistrazionePalestra.form b/src/registrazionepalestra/RegistrazionePalestra.form index 48eb150..d9a6c20 100644 --- a/src/registrazionepalestra/RegistrazionePalestra.form +++ b/src/registrazionepalestra/RegistrazionePalestra.form @@ -28,7 +28,7 @@ - + @@ -36,40 +36,57 @@ - - - - - - + - - - + + + + + + + + - - - - - + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -82,57 +99,54 @@ - - - + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + - + - - - - - + + + - + - + @@ -184,30 +198,29 @@ + + + + + + + + + + + + - - - - - - - - - - - - - - - - + + + @@ -226,21 +239,6 @@ - - - - - - - - - - - - - - - @@ -261,6 +259,9 @@ + + + @@ -272,5 +273,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/registrazionepalestra/RegistrazionePalestra.java b/src/registrazionepalestra/RegistrazionePalestra.java index 68f9c5a..3900b4d 100644 --- a/src/registrazionepalestra/RegistrazionePalestra.java +++ b/src/registrazionepalestra/RegistrazionePalestra.java @@ -4,13 +4,20 @@ */ package registrazionepalestra; +import javax.swing.BorderFactory; +import javax.swing.JOptionPane; +import javax.swing.border.LineBorder; +import java.awt.Color; +import java.util.Arrays; + /** * * @author Verde */ public class RegistrazionePalestra extends javax.swing.JFrame { - - private static final java.util.logging.Logger logger = java.util.logging.Logger.getLogger(RegistrazionePalestra.class.getName()); + + private static final java.util.logging.Logger logger = java.util.logging.Logger + .getLogger(RegistrazionePalestra.class.getName()); /** * Creates new form RegistrazionePalestra @@ -25,6 +32,7 @@ public class RegistrazionePalestra extends javax.swing.JFrame { * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") + // //GEN-BEGIN:initComponents private void initComponents() { @@ -43,17 +51,20 @@ public class RegistrazionePalestra extends javax.swing.JFrame { txtCodiceFiscale = new javax.swing.JTextField(); txtEmail = new javax.swing.JTextField(); txtPassword = new javax.swing.JPasswordField(); - radSessoM = new javax.swing.JRadioButton(); - radSessoF = new javax.swing.JRadioButton(); jComboBox1 = new javax.swing.JComboBox<>(); - chkYoga = new javax.swing.JCheckBox(); - chkPilates = new javax.swing.JCheckBox(); - chkFitness = new javax.swing.JCheckBox(); jScrollPane1 = new javax.swing.JScrollPane(); txtaNote = new javax.swing.JTextArea(); btnRegistra = new javax.swing.JButton(); btnCancella = new javax.swing.JButton(); btnChiudi = new javax.swing.JButton(); + pnlCorsi = new javax.swing.JPanel(); + chkFitness = new javax.swing.JCheckBox(); + chkPilates = new javax.swing.JCheckBox(); + chkYoga = new javax.swing.JCheckBox(); + pnlSesso = new javax.swing.JPanel(); + radSessoF = new javax.swing.JRadioButton(); + radSessoM = new javax.swing.JRadioButton(); + radSessoNB = new javax.swing.JRadioButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); @@ -75,73 +86,164 @@ public class RegistrazionePalestra extends javax.swing.JFrame { lblNote.setText("Note"); - Sesso.add(radSessoM); - radSessoM.setText("M"); + txtNome.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + txtNomeFocusGained(evt); + } + }); - Sesso.add(radSessoF); - radSessoF.setText("F"); + txtCognome.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + txtCognomeFocusGained(evt); + } + }); + + txtCodiceFiscale.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + txtCodiceFiscaleFocusGained(evt); + } + }); + + txtEmail.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + txtEmailFocusGained(evt); + } + }); + + txtPassword.addFocusListener(new java.awt.event.FocusAdapter() { + public void focusGained(java.awt.event.FocusEvent evt) { + txtPasswordFocusGained(evt); + } + }); jComboBox1.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Roma", "Londra", "Parigi", "Berlino", "Mosca", "Tjumen" })); - chkYoga.setText("Yoga"); - - chkPilates.setText("Pilates"); - - chkFitness.setText("Fitness"); - txtaNote.setColumns(20); txtaNote.setLineWrap(true); txtaNote.setRows(5); jScrollPane1.setViewportView(txtaNote); btnRegistra.setText("Registra"); + btnRegistra.addActionListener(this::btnRegistraActionPerformed); btnCancella.setText("Cancella"); btnChiudi.setText("Chiudi"); + chkFitness.setText("Fitness"); + chkFitness.addActionListener(this::chkFitnessActionPerformed); + + chkPilates.setText("Pilates"); + chkPilates.addActionListener(this::chkPilatesActionPerformed); + + chkYoga.setText("Yoga"); + chkYoga.addActionListener(this::chkYogaActionPerformed); + + javax.swing.GroupLayout pnlCorsiLayout = new javax.swing.GroupLayout(pnlCorsi); + pnlCorsi.setLayout(pnlCorsiLayout); + pnlCorsiLayout.setHorizontalGroup( + pnlCorsiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnlCorsiLayout.createSequentialGroup() + .addComponent(chkYoga) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(chkPilates) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(chkFitness) + .addGap(0, 0, Short.MAX_VALUE)) + ); + pnlCorsiLayout.setVerticalGroup( + pnlCorsiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlCorsiLayout.createSequentialGroup() + .addGap(0, 0, Short.MAX_VALUE) + .addGroup(pnlCorsiLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(chkYoga) + .addComponent(chkPilates) + .addComponent(chkFitness))) + ); + + Sesso.add(radSessoF); + radSessoF.setText("F"); + radSessoF.addActionListener(this::radSessoFActionPerformed); + + Sesso.add(radSessoM); + radSessoM.setText("M"); + radSessoM.addActionListener(this::radSessoMActionPerformed); + + Sesso.add(radSessoNB); + radSessoNB.setText("NB"); + radSessoNB.addActionListener(this::radSessoNBActionPerformed); + + javax.swing.GroupLayout pnlSessoLayout = new javax.swing.GroupLayout(pnlSesso); + pnlSesso.setLayout(pnlSessoLayout); + pnlSessoLayout.setHorizontalGroup( + pnlSessoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlSessoLayout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addComponent(radSessoM) + .addGap(18, 18, 18) + .addComponent(radSessoF) + .addGap(18, 18, 18) + .addComponent(radSessoNB) + .addContainerGap()) + ); + pnlSessoLayout.setVerticalGroup( + pnlSessoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(pnlSessoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(radSessoM) + .addComponent(radSessoF) + .addComponent(radSessoNB)) + ); + javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() - .addContainerGap() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblNome) .addComponent(lblCognome) .addComponent(lblCodiceFiscale) .addComponent(lblEmail) .addComponent(lblPassword) - .addComponent(lblSesso) - .addComponent(lblCittà) - .addComponent(lblCorsi) - .addComponent(lblNote) - .addComponent(btnRegistra)) - .addGap(35, 35, 35) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) + .addComponent(lblSesso)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addGap(35, 35, 35) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(txtNome, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE) + .addComponent(txtCognome, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txtCodiceFiscale, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txtEmail, javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(txtPassword, javax.swing.GroupLayout.Alignment.LEADING))) + .addGroup(layout.createSequentialGroup() + .addGap(51, 51, 51) + .addComponent(pnlSesso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(layout.createSequentialGroup() + .addContainerGap(9, Short.MAX_VALUE) + .addComponent(btnRegistra) + .addGap(35, 35, 35)) + .addGroup(layout.createSequentialGroup() + .addContainerGap() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addComponent(lblCittà) + .addComponent(lblCorsi) + .addComponent(lblNote)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(btnCancella) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGap(41, 41, 41) .addComponent(btnChiudi)) - .addGroup(layout.createSequentialGroup() - .addComponent(chkYoga) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(chkPilates) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(chkFitness)) - .addComponent(txtNome) - .addComponent(txtCognome) - .addComponent(txtCodiceFiscale) - .addComponent(txtEmail) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() - .addComponent(radSessoM) - .addGap(38, 38, 38) - .addComponent(radSessoF) - .addGap(47, 47, 47)) - .addComponent(jComboBox1, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) - .addComponent(txtPassword) - .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 192, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addContainerGap(16, Short.MAX_VALUE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 191, javax.swing.GroupLayout.PREFERRED_SIZE) + .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) + .addComponent(pnlCorsi, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 191, Short.MAX_VALUE) + .addComponent(jComboBox1, javax.swing.GroupLayout.Alignment.LEADING, 0, 191, Short.MAX_VALUE)))) + .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) @@ -151,42 +253,39 @@ public class RegistrazionePalestra extends javax.swing.JFrame { .addComponent(lblNome) .addComponent(txtNome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lblCognome) - .addComponent(txtCognome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtCognome, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lblCognome)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtCodiceFiscale, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lblCodiceFiscale)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lblEmail)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lblCodiceFiscale) - .addComponent(txtCodiceFiscale, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(lblSesso, javax.swing.GroupLayout.Alignment.TRAILING) + .addGroup(layout.createSequentialGroup() + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lblPassword)) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) + .addComponent(pnlSesso, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lblEmail) - .addComponent(txtEmail, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lblPassword) - .addComponent(txtPassword, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addComponent(lblSesso) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(radSessoM) - .addComponent(radSessoF))) - .addGap(5, 5, 5) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblCittà) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(lblCorsi) - .addComponent(chkYoga) - .addComponent(chkPilates) - .addComponent(chkFitness)) + .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) + .addComponent(pnlCorsi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(lblCorsi)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(lblNote) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE)) - .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 13, Short.MAX_VALUE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnRegistra) .addComponent(btnCancella) @@ -197,14 +296,110 @@ public class RegistrazionePalestra extends javax.swing.JFrame { pack(); }// //GEN-END:initComponents + private void btnRegistraActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_btnRegistraActionPerformed + String nome = txtNome.getText().trim(); + String cognome = txtCognome.getText().trim(); + String codiceFiscale = txtCodiceFiscale.getText().trim().toUpperCase(); + String email = txtEmail.getText().trim(); + String password = new String(txtPassword.getPassword()); + boolean nomeEmpty = nome.isEmpty(); + boolean cognomeEmpty = cognome.isEmpty(); + boolean codiceFiscaleEmpty = codiceFiscale.isEmpty(); + boolean emailEmpty = email.isEmpty(); + boolean passwordEmpty = password.isEmpty(); + boolean sessoEmpty = Sesso.getSelection() == null; + boolean corsiEmpty = isCorsiEmpty(); + + if (nomeEmpty || cognomeEmpty || codiceFiscaleEmpty || emailEmpty || passwordEmpty || sessoEmpty + || corsiEmpty) { + if (nomeEmpty) { + txtNome.setBorder(new LineBorder(Color.red)); + } + if (cognomeEmpty) { + txtCognome.setBorder(new LineBorder(Color.red)); + } + if (codiceFiscaleEmpty) { + txtCodiceFiscale.setBorder(new LineBorder(Color.red)); + } + if (emailEmpty) { + txtEmail.setBorder(new LineBorder(Color.red)); + } + if (passwordEmpty) { + txtPassword.setBorder(BorderFactory.createLineBorder(Color.red)); + } + if (sessoEmpty) { + pnlSesso.setBorder(new LineBorder(Color.red)); + } + if (corsiEmpty) { + pnlCorsi.setBorder(new LineBorder(Color.red)); + } + JOptionPane.showMessageDialog(null, "Inserire tutti i dati richiesti."); + + return; + } + + }// GEN-LAST:event_btnRegistraActionPerformed + + private boolean isCorsiEmpty() { + return !(chkYoga.isSelected() || chkPilates.isSelected() || chkFitness.isSelected()); + } + + private void txtNomeFocusGained(java.awt.event.FocusEvent evt) {// GEN-FIRST:event_txtNomeFocusGained + txtNome.setBorder(null); + }// GEN-LAST:event_txtNomeFocusGained + + private void txtCognomeFocusGained(java.awt.event.FocusEvent evt) {// GEN-FIRST:event_txtCognomeFocusGained + txtCognome.setBorder(null); + }// GEN-LAST:event_txtCognomeFocusGained + + private void txtCodiceFiscaleFocusGained(java.awt.event.FocusEvent evt) {// GEN-FIRST:event_txtCodiceFiscaleFocusGained + txtCodiceFiscale.setBorder(null); + }// GEN-LAST:event_txtCodiceFiscaleFocusGained + + private void txtEmailFocusGained(java.awt.event.FocusEvent evt) {// GEN-FIRST:event_txtEmailFocusGained + txtEmail.setBorder(null); + }// GEN-LAST:event_txtEmailFocusGained + + private void txtPasswordFocusGained(java.awt.event.FocusEvent evt) {// GEN-FIRST:event_txtPasswordFocusGained + txtPassword.setBorder(null); + }// GEN-LAST:event_txtPasswordFocusGained + + private void radSessoMActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_radSessoMActionPerformed + pnlSesso.setBorder(null); + }// GEN-LAST:event_radSessoMActionPerformed + + private void radSessoFActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_radSessoFActionPerformed + pnlSesso.setBorder(null); + }// GEN-LAST:event_radSessoFActionPerformed + + private void radSessoNBActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_radSessoNBActionPerformed + pnlSesso.setBorder(null); + }// GEN-LAST:event_radSessoNBActionPerformed + + private void chkYogaActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_chkYogaActionPerformed + pnlCorsi.setBorder(null); + }// GEN-LAST:event_chkYogaActionPerformed + + private void chkPilatesActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_chkPilatesActionPerformed + pnlCorsi.setBorder(null); + }// GEN-LAST:event_chkPilatesActionPerformed + + private void chkFitnessActionPerformed(java.awt.event.ActionEvent evt) {// GEN-FIRST:event_chkFitnessActionPerformed + pnlCorsi.setBorder(null); + }// GEN-LAST:event_chkFitnessActionPerformed + /** * @param args the command line arguments */ public static void main(String args[]) { /* Set the Nimbus look and feel */ - // - /* 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 + // + /* + * 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()) { @@ -216,7 +411,7 @@ public class RegistrazionePalestra extends javax.swing.JFrame { } catch (ReflectiveOperationException | javax.swing.UnsupportedLookAndFeelException ex) { logger.log(java.util.logging.Level.SEVERE, null, ex); } - // + // /* Create and display the form */ java.awt.EventQueue.invokeLater(() -> new RegistrazionePalestra().setVisible(true)); @@ -241,8 +436,11 @@ public class RegistrazionePalestra extends javax.swing.JFrame { private javax.swing.JLabel lblNote; private javax.swing.JLabel lblPassword; private javax.swing.JLabel lblSesso; + private javax.swing.JPanel pnlCorsi; + private javax.swing.JPanel pnlSesso; private javax.swing.JRadioButton radSessoF; private javax.swing.JRadioButton radSessoM; + private javax.swing.JRadioButton radSessoNB; private javax.swing.JTextField txtCodiceFiscale; private javax.swing.JTextField txtCognome; private javax.swing.JTextField txtEmail;