private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        String add=ta1.getText();
        String phone=t3.getText();
        
        if(username.isEmpty())
        {JOptionPane.showMessageDialog (this, "Please enter your Username");}
        
        else if(add.isEmpty())
        {JOptionPane.showMessageDialog (this, "Please enter your address");}
         
        else if(phone.isEmpty())
        {JOptionPane.showMessageDialog (this, "Please enter your Phone Number");}
        
        else if(cb1.isSelected()==false)
        {JOptionPane.showMessageDialog (this, "Please Select Terms and Conditions");}
        
        else if(cb2.isSelected()==false)
        {JOptionPane.showMessageDialog (this, "Please acknowldge the information is correct");}
        
        else{
        try{
            
            String query="update users set address='"+add+"' ,phoneno="+phone+" where username='"+username+"';";

            MyQueries.excUpdate(query);
            myClasses.Connections.close(); // Close connection to prevent Database lock
            JOptionPane.showMessageDialog (this,"Information added");
        }
        catch(Exception e)
        {
            logger.error("Error Description:", e);
        }}
    }//GEN-LAST:event_jButton2ActionPerformed