List of usage examples for javax.swing JPanel createToolTip
public JToolTip createToolTip()
JToolTip
that should be used to display the tooltip. From source file:com.atlassian.theplugin.idea.bamboo.tree.BuildTreeNode.java
public static void addTooltipToPanel(BambooBuildAdapter build, JPanel p) { final JToolTip jToolTip = p.createToolTip(); jToolTip.setTipText(buildTolltip(build, 0)); final int prefWidth = jToolTip.getPreferredSize().width; int width = prefWidth > MAX_TOOLTIP_WIDTH ? MAX_TOOLTIP_WIDTH : 0; p.setToolTipText(buildTolltip(build, width)); }