aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Tooltips in JFileChooser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Tooltips in JFileChooser" Watch "Tooltips in JFileChooser" New topic
Author

Tooltips in JFileChooser

Isaac Hewitt
Ranch Hand

Joined: Jul 24, 2006
Posts: 190

Does anyone know whether it is possble to have tooltips overtop of files in a JFileChooser. I have posted my code below.



Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4530
    
    5

You seem to have reinvented javax.swing.filechooser.FileNameExtensionFilter

Setting location-sensitive tool tips on a JFileChooser can be tricky. You can obtain a reference to the JList subclass that displays the folder contents, and do some fancy stuff with locationToIndex(...) but what do you do when the user toggles the display between a list and a table? Have you thought about that?


luck, db
There are no new questions, but there may be new answers.
Isaac Hewitt
Ranch Hand

Joined: Jul 24, 2006
Posts: 190

Thanks for your ingenious reply. This is a custom program I am doing for a friend, so I will just have to tell him to NOT toggle over to the JTable.
Darryl Burke
Bartender

Joined: May 03, 2008
Posts: 4530
    
    5

Maybe you can get some ideas from this old thread about adding a menu item to a file chooser's context menu.

On the Sun forums
http://forums.sun.com/thread.jspa?threadID=5449932
(migrated to http://forums.oracle.com/forums/thread.jspa?threadID=1348166)
Isaac Hewitt
Ranch Hand

Joined: Jul 24, 2006
Posts: 190

Thanks for the link.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tooltips in JFileChooser