Swing: JFileChooser with favorites? -


I am working on an application that needs to be selected. It's a good start, but I need to increase it. I can start it on a special directory with JFileChooser.setCurrentDirectory () , but how can I provide the user with "preferred" functionality, either the context of the favorite files saved later For or to the favorite directories?

While Jfilecloser accessory was to be intended for things like thumbnails of the currently selected file, copy :

An assistant is often used to show a preview image of the selected file; However, it can be used for anything that a programmer wishes, such as additional custom file selector controls.

So you have to create a custom JComponent to represent "Favorite Directory", then call setAccessory (myFavesComponent) to your file selector.

In order to actually implement the storage of favorite directories, you would want to use it.


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -