The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2001



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


file object to treepath

Posted by sunny sun on July 12, 2001 at 11:36 AM

> Hello guys,

> I've a problem with my file explorer. i have an file objct and want to convert it to a TreePath object and dont know how to do it.

> I hope s.o. can help me.
> Thanks
> Frank

you can wrapper this file object into a custom TreeNode and then add this node to your explorer model(it's supposed to be a TreeModel. if you want to manipulate this file object, you register a TreeSelectionListener or TreeExpansionListener to your explorer model.


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us