public class Main { public static void main(String[] argv) throws Exception {
JTree tree = new JTree();
// Search forward from first visible row looking for any visible node
// whose name starts with prefix. int startRow = 0;
String prefix = "b";
TreePath path = tree.getNextMatch(prefix, startRow, Position.Bias.Forward);
System.out.println(path);
}
}