private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed
        // TODO add your handling code here:
        generated.Test4.deleteNode(currentNode);
        
        int[] tmp = jTree1.getSelectionRows();
        //TreePath temp = jTree1.getSelectionPath();
        jTree1.setModel(new DefaultTreeModel(generated.Test4.transform()));
        if(tmp.length > 0)
            jTree1.expandRow(tmp[0]);
        //jTree1.expandPath(temp);
    }//GEN-LAST:event_jButton2ActionPerformed