File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT / JFace and the fly likes To add Icons along with text in a JList[urgent.........] Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT / JFace
Reply Bookmark "To add Icons along with text in a JList[urgent.........]" Watch "To add Icons along with text in a JList[urgent.........]" New topic
Author

To add Icons along with text in a JList[urgent.........]

netharam ram
Ranch Hand

Joined: Aug 09, 2001
Posts: 202
Hi, I have Jlist that lists the files & folders in a specified 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.Nathan please do reply this post!!!
Happy middling with java.
Netharam. :roll:
[ January 26, 2002: Message edited by: netharam ram ]
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Netharam,
Yes it is possible. I have never done it personally but take a look at the following link and you should be able to figure out how to do it for a list (similar to ComboBox).
http://java.sun.com/docs/books/tutorial/uiswing/components/combobox.html#renderer
Regards,
Manfred.
 
 
subject: To add Icons along with text in a JList[urgent.........]
 
Threads others viewed
resizing a Jlist's width by the user[urgent]
How to add icons along with the text in a JList[urgent]
To add icon top of the text in JList
How to set the filter for a Save File Dialog for Folders?
LinkedList Problems in JSP