question: private void updateSelection ( ) { TreePath selectionPath = tree . getSelectionPath ( ) ; if ( selectionPath != null ) { Entry selectedEntry = ( Entry ) selectionPath . getLastPathComponent ( ) ; if ( ! ( selectedEntry instanceof Folder ) ) { tree . setSelectionPath ( selectionPath . getParentPath ( ) ) ; } } }
target:  Updates the path selected via the tree.