Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import javax.swing.JTree;

import javax.swing.tree.TreePath;

public class Main {
    public static String getNameNodoAtIndex(int ind, JTree jtree) {

        TreePath parentPath = jtree.getSelectionPath();

        int level = 0;

        if (parentPath != null) {

            level = parentPath.getPathCount();
        }

        return "" + parentPath.getPathComponent(ind);
    }
}