Using JTree to browse remote system

What is best way to use JTree to browse remote file system (while using client on local mashine and some server application on remote).

I tryed to make TreeModel on remote, serialize it and send to local but it doesnt apper to work.

[245 byte] By [Alantiea] at [2007-11-27 11:13:01]
# 1

What I would do would be to obtain the File object representing the file system I want to work with and create the Tree from the File structure by using the listFiles( ) methods.

Usually this could be done by passing the File to a custom TreeModel that would handle this operation.

ICE

icewalker2ga at 2007-7-29 13:58:15 > top of Java-index,Desktop,Core GUI APIs...
# 2

The thing is that i also must have way to actively work with this files and local files, i.e. copy/paste or move and thus i need way to send to remote system needed action and refresh remote tree after and better without resending whole custom model.

Alantiea at 2007-7-29 13:58:15 > top of Java-index,Desktop,Core GUI APIs...
# 3

There should not be any send of models any where. Only the reference information above the files you are accessing, local or remote.

When that information is obtained, then you can create the tree from the File information.

You can create custom TreeNode objects that store references to each file in the system. So if the TreeNode is clicked, the file reference is obtained and you read or write to the file as required.

Is this clear?

ICE

icewalker2ga at 2007-7-29 13:58:15 > top of Java-index,Desktop,Core GUI APIs...