Java examples for Swing:JTree
go To JTree Node
//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);/* w ww . ja va 2 s.c o m*/ t.scrollPathToVisible(path); } }