private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        String serverID = null;
        if (jComboBox1.getSelectedIndex() > -1) {
            serverID = ((String[]) serverMap.get((Integer) jComboBox1.getSelectedIndex()))[1];
        }
        System.out.println("In registerNym Dialog, server ID:" + serverID + " nymID:" + nymID);

        try {
            setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            int status = new NYM().registerNym(serverID, nymID);
            if (status == 0) {
                JOptionPane.showMessageDialog(this, "Nym registered sucessfully on the server", "NYM registration success", JOptionPane.INFORMATION_MESSAGE);
                // Refresh Market NYM list
                MainPage.refreshMarketNym(serverID);
                this.serverID = serverID;
            } else if (status == 1) {
                JOptionPane.showMessageDialog(this, "Nym is already registered on server " + serverID, "Already registered", JOptionPane.ERROR_MESSAGE);
            } else {
                JOptionPane.showMessageDialog(this, "Cannot register nym on server", "Error", JOptionPane.ERROR_MESSAGE);
            }
        } catch (InterruptedException ex) {
            ex.printStackTrace();
        } finally {
            setCursor(Cursor.getDefaultCursor());
            dispose();
        }
    }//GEN-LAST:event_jButton1ActionPerformed