Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tooltips in JFileChooser

 
Isaac Hewitt
Ranch Hand
Posts: 191
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Isaac Hewitt
Ranch Hand
Posts: 191
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 191
Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the link.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic