FileRenderer
Hi there all,
I'm trying to create a Jlist that will show either a folder or file that I have added to it from a JFileChooser. I've been able to create my own ListCellRenderer but was wondering if there is not already something out there.
Secondly I would like to create my own Cell Renderer but require the icons, does any one know how I could use the system icons from my program for this?
Thanks
[426 byte] By [
tarmenela] at [2007-11-27 11:57:39]

# 2
Here is a way to obtain the icons used by the file system to display any particular file or folder.
Use the javax.swing.filechooser.FIleSystemView.
This class has a getSystemIcon( ) which returns the icon used by the local file system for any file at all.
It also contains several useful methods which you can use to make your renderer complete. I would suggest you build your renderer from scratch cause it would help you learn and also it would be tailored for your specific requirements in your app.
ICE