This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I have Jlist that lists the files & folders in as pecified path.I want to differentiate folders from files,so I wish to add a folder icon along with the folder path in the Jlist.Is this Possible?Please reply me as soon as possible. Happy middling with java. Netharam :roll:
All you have to do is extend DefaultListCell Renderer to do what you want (if the current item is a directory, add an icon showing it is a Directory instead of a file), then call setCellRenderer() on your JList with an instance of your new ListCellRenderer.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Joined: Aug 09, 2001
HI, Nathan could u please reply with a code snippet for I've very less knowledge in swing. Happy middling with java. : Netharam. :roll: