private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        try{
            boolean isPurse = true;
            if(jTextArea1.getText().length()<1){
                JOptionPane.showMessageDialog(this, "Error in cash purse import. Empty purse","Error",JOptionPane.ERROR_MESSAGE);
                return;
            }
            if(!jTextArea1.getText().trim().startsWith("-----BEGIN SIGNED CASH-----") &&  !jTextArea1.getText().trim().startsWith("-----BEGIN SIGNED PURSE-----")){
                JOptionPane.showMessageDialog(this, "Please enter valid purse/token","Purse Error",JOptionPane.ERROR_MESSAGE);
                return;
            }

            if(jTextArea1.getText().trim().startsWith("-----BEGIN SIGNED CASH-----")){
                isPurse = false;
            }
            setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
            boolean success = new CashPurseAccount().importCashPurse(serverID,nymID,assetID,jTextArea1.getText(),isPurse);
            if(success){
                JOptionPane.showMessageDialog(this, "Cash imported successfully","Success",JOptionPane.INFORMATION_MESSAGE);
                CashPurseDetails details = new CashPurseAccount().getCashPurseDetails(serverID+":"+assetID+":"+nymID);
                CashPurseAccountBottomPanel.populateCashPurseDetails(details);
                CashPurseAccountTopPanel.populateCashPurseDetails(details, details.getBalance());
                MainPage.reLoadAccount();
            } else
                JOptionPane.showMessageDialog(this, "Error in cash purse import","Server Error",JOptionPane.ERROR_MESSAGE);
        }catch(Exception e){
            e.printStackTrace();
        }finally{
            setCursor(Cursor.getDefaultCursor());
            this.dispose();
        }
    }//GEN-LAST:event_jButton1ActionPerformed