JTree in JScrollpane, find out

I have following constellation:

AJTree in aJScrollpane with avertical scrollbar.

Most nodes are hidden "behind the scrollpane" and only view are seen.

I search for aproperty which signals if anode is currently seen on screen and which are "scrolled" (that means those nodes which aren't visible) (the jcomponent method isVisible() doesn't work)

I think about such a method which uses the information of the scrollbarposition and the dimension of the jviewport but i can't get the information which node is seen if some nodes are expanded and some are collapsed.

Does anybody know such a property or method?

Or is there a SWING-THING which solves the problem?

Thank you for your answers

[778 byte] By [mqs24da] at [2007-10-2 13:17:42]
# 1
tryisShowing()
Michael_Dunna at 2007-7-13 10:50:46 > top of Java-index,Desktop,Core GUI APIs...
# 2

isVisible() is a "Component-Method" which means i have to take the rendered component finding out the visible nodes.

my application is following:

i write a method which expand all nodes until the leafs are visible but because of performance (i have more than 1000 nodes directly under the root) i want to expand only the nodes which are showing and expand the other later.

mqs24da at 2007-7-13 10:50:46 > top of Java-index,Desktop,Core GUI APIs...
# 3
There is a method in JTree called getPathBounds. It takes a TreePath as input argument, and returns the Rectangle the corresponding node will be drawn into. You might be able to use that, by checking if the rectangle is within the visible bounds of the scrollpane's viewport.
happy_hippoa at 2007-7-13 10:50:46 > top of Java-index,Desktop,Core GUI APIs...