Java tutorial
//package com.java2s; import javax.swing.*; import javax.swing.tree.TreePath; public class Main { public static void goToNode(JTree t, TreePath path) { t.setSelectionPath(path); t.scrollPathToVisible(path); } }