Testing JTree setSelectionPath(TreePath path)?
How can I tell if a call to JTree setSelectionPath(TreePath path) fails
because of an invalid path? I have a search function set up which
stores TreePaths. While browsing the TreePaths I choose one or more
and when I do, I expand the chosen TreePath (using setSelectionPath())
and select the TreeNode. This works great. Now, if the structure of
the tree changes, I want to be able to know that my attempt at
setSelectionPath() didn't work. I thought that perhaps getting the
selected object after calling setSelectionPath() and testing for null
would work, but instead it returns what seems to be the object at the
bottom of the TreePath I attempted to use to set the selection in the
Any ideas? Is there a path validation function I'm overlooking?
-Carl Gundel, author of Liberty BASIC
Re: Testing JTree setSelectionPath(TreePath path)?
On 2 Jan 2005 19:40:35 -0800, firstname.lastname@example.org wrote:
> How can I tell if a call to JTree ...
GUI experts are best found at..
http://www.PhySci.org/codes/ Web & IT Help
http://www.PhySci.org/ Open-source software suite
http://www.1point1C.org/ Science & Technology
http://www.LensEscapes.com/ Images that escape the mundane
|All times are GMT. The time now is 07:53 AM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.