Java Swing Tooltip toolTip(JComponent c, String s)

Here you can find the source of toolTip(JComponent c, String s)

Description

tool Tip

License

Open Source License

Declaration

static public void toolTip(JComponent c, String s) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.*;

public class Main {

    static public void toolTip(JComponent c, String s) {
        String o = c.getToolTipText();
        if (s != null && s.length() == 0)
            s = null;//from ww w  .  j a v  a 2s.  c o m
        if (o == s)
            return;
        if (o == null || s == null || !o.equals(s))
            c.setToolTipText(s);
    }
}

Related

  1. performMultipleReplacements(final Document theDocument, final String theRegexToSearch, final String theReplacement)
  2. setLongerTooltips()
  3. setTooltipDismissDelay()
  4. showTooltipNow(JComponent c)
  5. showToolTipNow(JComponent component)
  6. unregisterComponentAtTooltipManager(JComponent c)