• Post Reply Bookmark Topic Watch Topic
  • New Topic

Sorting in File Tree node in Swing  RSS feed

 
Shashank Bharadwaj
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have requirement of sorting the files in tree structure with name and timestamp of creation, i am new to swings , can anyone help on this.


Here we are using FileTreeModel.

Root Folder:
folder1;
file1
file2
.
.


Request to help out on this.


Regards,Shashank


 
K. Tsang
Bartender
Posts: 3632
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

I don't see a FileTreeModel class in the Java API. How are you implementing it? By extending DefaultTreeModel class, implementing TreeModel interface directly?

Hint the latter one.
 
Shashank Bharadwaj
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
K. Tsang wrote:Welcome to the Ranch.

I don't see a FileTreeModel class in the Java API. How are you implementing it? By extending DefaultTreeModel class, implementing TreeModel interface directly?

Hint the latter one.



I am implementing TreeModel Interface
 
K. Tsang
Bartender
Posts: 3632
16
Firefox Browser Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Great then you should on the right track

Have a look at this to see if you are close.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!