|
Kewl thanks. Ron Power Programmer Information Services City Of St. John's, NL P.O. Box 908 St. John's, NL A1C 5M2 Tel: 709-576-8132 Email: rpower@xxxxxxxxxx Website: http://www.stjohns.ca/ ___________________________________________________________________________ Success is going from failure to failure without a loss of enthusiasm. - Sir Winston Churchill "Frank Lustig" <flustig@xxxxxxxxx> Sent by: java400-l-bounces@xxxxxxxxxxxx 21/03/2005 03:20 PM Please respond to Java Programming on and around the iSeries / AS400 <java400-l@xxxxxxxxxxxx> To <java400-l@xxxxxxxxxxxx> cc Subject Re: Help >You know how in windows explorer you have the + sign next to folders, you >click it the folders expand, etc. Anyone know how to do this? Ron, look at the javadocs on JTree, DefaultTreeCellRenderer and other related. Also look at the topic in general: http://java.sun.com/docs/books/tutorial/uiswing/components/tree.html I've been able to completely replace the folder images and use my own custom images thar are more appropiate for the data I'm displaying with the Tree. What you want to do is replace the plain folder image with one that has a plus next to it. You can go beyond this using different icons for whatever criteria you may define. (This may be overkill for your application) Also take a look at this short tip: http://www.developer.com/java/other/article.php/768051 One final note, I recall reading somewhere that Microsoft own some sort of patent on use of plus/minus images for this file-browsing context. Maybe others on the list can verify whether this is true or just a hoax/urban legend. -- This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/java400-l or email: JAVA400-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.