How can I get the index of a selected node in its parent. For example D
should be index 3 in root
. I tried with jTree.getSelectionPath()
but it doesn't show the index
root
A
B
C
a
D
a
b
c
E
JTree has the methods
public int[] getSelectionRows()
public int getMinSelectionRow()
public int getMaxSelectionRow()