private JTreeNode<T> convertList( JTreeNode<T> current, boolean isLeft){

		if(current == null){
			return null;
		}

		JTreeNode<T> left = convertList(current.getLeftNode(), true);
		JTreeNode<T> right = convertList(current.getRightNode(), false);

		if(left!=null && right==null){
			left.setRightNode(current);
			current.setLeftNode(left);
			return current;
		}

		if(left==null && right!=null) {
			current.setRightNode(right);
			right.setLeftNode(current);
			return current;
		}

		if(left!=null && right!=null){
			left.setRightNode(current);
			current.setLeftNode(left);

			current.setRightNode(right);
			right.setLeftNode(current);
			if(isLeft) {
				return right;
			}

			return left;
		}


		return current;

	}