Make Tool Tips Remain Visible in Java

Description

The following code shows how to make Tool Tips Remain Visible.

Example


  // w  w w  .  j a v  a  2  s.  c  o m


import javax.swing.ToolTipManager;

public class Main {
  public static void main(String[] argv) throws Exception {

    // Get current delay
    int dismissDelay = ToolTipManager.sharedInstance().getDismissDelay();

    // Keep the tool tip showing
    dismissDelay = Integer.MAX_VALUE;
    ToolTipManager.sharedInstance().setDismissDelay(dismissDelay);

  }
}




















Home »
  Java Tutorial »
    Swing »




Action
Border
Color Chooser
Drag and Drop
Event
Font Chooser
JButton
JCheckBox
JComboBox
JDialog
JEditorPane
JFileChooser
JFormattedText
JFrame
JLabel
JList
JOptionPane
JPasswordField
JProgressBar
JRadioButton
JScrollBar
JScrollPane
JSeparator
JSlider
JSpinner
JSplitPane
JTabbedPane
JTable
JTextArea
JTextField
JTextPane
JToggleButton
JToolTip
JTree
Layout
Menu
Timer