Have Multi-line string in a JToolTipTag(s): Swing


We saw that since Swing (JDK1.2) implements simple HTML rendering for its components, it's possible to display underlined string (on JLabel or JButton for example). The same feature is true for JToolTip.
myComponent.setToolTipText
  ("<html><p>This ToolTip is</p><p>two lines</p></html>");

blog comments powered by Disqus