Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Implementing multi-line tooltip  RSS feed

 
Matt Hansen
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order to implement multi-line tooltip in a JTable I'm trying to extend the DefaultTableCellRenderer to override createToolTip to use my MultiLineToolTip. When I override createToolTip for a JButton it works fine and I can get a multi-line tooltip. But, when I try to override it in my extended DefaultTableCellRenderer the method never gets called. Any suggestions?
Here's my code (there's not much to it):
 
Matt Hansen
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure why but I moved createToolTip to the table instead of the cell renderer and now it works.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!