Controllo campi vuoti
This commit is contained in:
9
nbproject/private/private.xml
Normal file
9
nbproject/private/private.xml
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project-private xmlns="http://www.netbeans.org/ns/project-private/1">
|
||||
<editor-bookmarks xmlns="http://www.netbeans.org/ns/editor-bookmarks/2" lastBookmarkId="0"/>
|
||||
<open-files xmlns="http://www.netbeans.org/ns/projectui-open-files/2">
|
||||
<group>
|
||||
<file>file:/home/Verde/git/RegistrazionePalestra/src/registrazionepalestra/RegistrazionePalestra.java</file>
|
||||
</group>
|
||||
</open-files>
|
||||
</project-private>
|
||||
@@ -28,7 +28,7 @@
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" 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"/>
|
||||
@@ -36,40 +36,57 @@
|
||||
<Component id="lblEmail" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblPassword" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblSesso" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblCittà" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblCorsi" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblNote" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnRegistra" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="35" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" max="-2" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<Component id="btnCancella" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="btnChiudi" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="35" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="txtNome" alignment="0" pref="191" max="32767" attributes="0"/>
|
||||
<Component id="txtCognome" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="txtCodiceFiscale" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="txtEmail" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="txtPassword" alignment="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="chkYoga" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="chkPilates" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="chkFitness" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="51" max="-2" attributes="0"/>
|
||||
<Component id="pnlSesso" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="txtNome" max="32767" attributes="0"/>
|
||||
<Component id="txtCognome" max="32767" attributes="0"/>
|
||||
<Component id="txtCodiceFiscale" max="32767" attributes="0"/>
|
||||
<Component id="txtEmail" max="32767" attributes="0"/>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Component id="radSessoM" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="38" max="-2" attributes="0"/>
|
||||
<Component id="radSessoF" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="47" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Component id="jComboBox1" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="txtPassword" alignment="0" max="32767" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" pref="192" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="16" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace pref="9" max="32767" attributes="0"/>
|
||||
<Component id="btnRegistra" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="35" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="102" attributes="0">
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lblCittà" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblCorsi" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblNote" alignment="0" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="btnCancella" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" pref="41" max="-2" attributes="0"/>
|
||||
<Component id="btnChiudi" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<Group type="103" alignment="0" groupAlignment="1" attributes="0">
|
||||
<Component id="jScrollPane1" alignment="1" min="-2" pref="191" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="1" max="-2" attributes="0">
|
||||
<Component id="pnlCorsi" alignment="0" pref="191" max="32767" attributes="0"/>
|
||||
<Component id="jComboBox1" alignment="0" pref="191" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -82,57 +99,54 @@
|
||||
<Component id="txtNome" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lblCognome" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtCognome" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="txtCognome" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblCognome" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="txtCodiceFiscale" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblCodiceFiscale" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="txtEmail" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblEmail" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lblCodiceFiscale" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtCodiceFiscale" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lblEmail" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtEmail" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lblPassword" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="txtPassword" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lblSesso" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" alignment="0" groupAlignment="3" attributes="0">
|
||||
<Component id="radSessoM" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radSessoF" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblSesso" alignment="1" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="102" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="txtPassword" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblPassword" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="pnlSesso" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
<EmptySpace min="-2" pref="5" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lblCittà" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jComboBox1" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="lblCorsi" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="chkYoga" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="chkPilates" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="chkFitness" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="1" attributes="0">
|
||||
<Component id="pnlCorsi" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="lblCorsi" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Component id="lblNote" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="jScrollPane1" min="-2" pref="121" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace pref="13" max="32767" attributes="0"/>
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="btnRegistra" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnCancella" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="btnChiudi" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<EmptySpace min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
@@ -184,30 +198,29 @@
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtNome">
|
||||
<Events>
|
||||
<EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="txtNomeFocusGained"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtCognome">
|
||||
<Events>
|
||||
<EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="txtCognomeFocusGained"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtCodiceFiscale">
|
||||
<Events>
|
||||
<EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="txtCodiceFiscaleFocusGained"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JTextField" name="txtEmail">
|
||||
<Events>
|
||||
<EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="txtEmailFocusGained"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JPasswordField" name="txtPassword">
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radSessoM">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="Sesso"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="M"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radSessoF">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="Sesso"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="F"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="focusGained" listener="java.awt.event.FocusListener" parameters="java.awt.event.FocusEvent" handler="txtPasswordFocusGained"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JComboBox" name="jComboBox1">
|
||||
<Properties>
|
||||
@@ -226,21 +239,6 @@
|
||||
<AuxValue name="JavaCodeGenerator_TypeParameters" type="java.lang.String" value="<String>"/>
|
||||
</AuxValues>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="chkYoga">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Yoga"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="chkPilates">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Pilates"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="chkFitness">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Fitness"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JScrollPane" name="jScrollPane1">
|
||||
<AuxValues>
|
||||
<AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
|
||||
@@ -261,6 +259,9 @@
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Registra"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnRegistraActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JButton" name="btnCancella">
|
||||
<Properties>
|
||||
@@ -272,5 +273,122 @@
|
||||
<Property name="text" type="java.lang.String" value="Chiudi"/>
|
||||
</Properties>
|
||||
</Component>
|
||||
<Container class="javax.swing.JPanel" name="pnlCorsi">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="0" attributes="0">
|
||||
<Component id="chkYoga" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="chkPilates" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
<Component id="chkFitness" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace min="0" pref="0" max="32767" attributes="0"/>
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="chkYoga" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="chkPilates" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="chkFitness" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JCheckBox" name="chkFitness">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Fitness"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkFitnessActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="chkPilates">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Pilates"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkPilatesActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JCheckBox" name="chkYoga">
|
||||
<Properties>
|
||||
<Property name="text" type="java.lang.String" value="Yoga"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="chkYogaActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
<Container class="javax.swing.JPanel" name="pnlSesso">
|
||||
|
||||
<Layout>
|
||||
<DimensionLayout dim="0">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="102" alignment="1" attributes="0">
|
||||
<EmptySpace max="32767" attributes="0"/>
|
||||
<Component id="radSessoM" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="radSessoF" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace type="separate" max="-2" attributes="0"/>
|
||||
<Component id="radSessoNB" min="-2" max="-2" attributes="0"/>
|
||||
<EmptySpace max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
<DimensionLayout dim="1">
|
||||
<Group type="103" groupAlignment="0" attributes="0">
|
||||
<Group type="103" groupAlignment="3" attributes="0">
|
||||
<Component id="radSessoM" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radSessoF" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
<Component id="radSessoNB" alignment="3" min="-2" max="-2" attributes="0"/>
|
||||
</Group>
|
||||
</Group>
|
||||
</DimensionLayout>
|
||||
</Layout>
|
||||
<SubComponents>
|
||||
<Component class="javax.swing.JRadioButton" name="radSessoF">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="Sesso"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="F"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radSessoFActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radSessoM">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="Sesso"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="M"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radSessoMActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
<Component class="javax.swing.JRadioButton" name="radSessoNB">
|
||||
<Properties>
|
||||
<Property name="buttonGroup" type="javax.swing.ButtonGroup" editor="org.netbeans.modules.form.RADComponent$ButtonGroupPropertyEditor">
|
||||
<ComponentRef name="Sesso"/>
|
||||
</Property>
|
||||
<Property name="text" type="java.lang.String" value="NB"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
<EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="radSessoNBActionPerformed"/>
|
||||
</Events>
|
||||
</Component>
|
||||
</SubComponents>
|
||||
</Container>
|
||||
</SubComponents>
|
||||
</Form>
|
||||
|
||||
@@ -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")
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated
|
||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//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();
|
||||
}// </editor-fold>//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 */
|
||||
//<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
|
||||
// <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()) {
|
||||
@@ -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);
|
||||
}
|
||||
//</editor-fold>
|
||||
// </editor-fold>
|
||||
|
||||
/* 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;
|
||||
|
||||
Reference in New Issue
Block a user