private void btnConfirmActionPerformed( java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnConfirmActionPerformed if (!txtUsername.getText().equals("") && !txtPassword.getText().equals("")) { BaseItems.UserItem currentUserItem = new BaseItems.UserItem(txtUsername.getText(), txtPassword.getText(), false); BaseXMLCommand<String, String, BaseItems.UserItem> command = new BaseXMLCommand<>("CreateUser", null, currentUserItem); _runClient.sendQuery(Command.Encoder(command)); BaseXMLCommand<String, String, String> response = Command.Decoder(_runClient.getResponse()); if (response.getValue().toString().equals("true")) { JOptionPane.showMessageDialog( this, "Registrazione effettuata con successo!", "Registrazione utente", JOptionPane.INFORMATION_MESSAGE); this.setVisible(false); } else { JOptionPane.showMessageDialog( this, "Errore durante la registrazione! Riprova!", "Registrazione utente", JOptionPane.ERROR_MESSAGE); } } else { JOptionPane.showMessageDialog( this, "Devi compilare correttamente tutti i campi!", "Registrazione utente", JOptionPane.ERROR_MESSAGE); } } // GEN-LAST:event_btnConfirmActionPerformed