Forums Register Login

Sorting in File Tree node in Swing

+Pie Number of slices to send: Send
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


+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
 

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
+Pie Number of slices to send: Send
Great then you should on the right track

Have a look at this to see if you are close.
Without deviation from the norm, progress is not possible - Zappa. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 605 times.
Similar Threads
How to make a binary tree in JSP?
How to decrease the size of jar file
Help needed to sort file names using bash shell script
Any body implemented File Drag and Drop with GWT?
Is it a good practice to save files in local system via signed applet
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 14:28:02.