Example usage for javax.swing JPanel createToolTip

List of usage examples for javax.swing JPanel createToolTip

Introduction

In this page you can find the example usage for javax.swing JPanel createToolTip.

Prototype

public JToolTip createToolTip() 

Source Link

Document

Returns the instance of JToolTip that should be used to display the tooltip.

Usage

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));
}