• Post Reply Bookmark Topic Watch Topic
  • New Topic

toolTips lost when saving to a file  RSS feed

 
Wray Ferrell
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In my code I set some tool tips using JCheckBox.setToolTipText("Howdy"). However if I save the object using ObjectOutPutStream and then read it back
in, everything is fine _except_ the tool tips are no longer there. Is there something I am missing?

Thanks, Wray
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tooltips are not part of JComponent, they are managed by the TooltipManager, so serializing a JComponent will not save the tooltip. You should set them back again with setToolTipText.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!