JTree Directory System

S

seung_shin

I am new to using JTree in JAVA. I implemented my own FileSystemModel
that implements TreeModel. It displays directories only in the file
system. It works fine except I get

C:\Mailbox
C:\Mailbox\Inbox
C:\Mailbox\Sentbox
C:\Mailbox\Savedbox
C:\Mailbox\Savedbox\Notes


How and where do I change it so it will display

Mailbox
Inbox
Sentbox
Savedbox
Notes


Also it displays the tree collapsed when I run it. I can expand the
tree by click on the node but I would like to have an expanded tree as
a default.

Thanks for help in advance~

Seung
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,787
Messages
2,569,627
Members
45,328
Latest member
66Teonna9

Latest Threads

Top