Changing the time for the JToolTip to appear

Use the Swing class ToolTipManager to change the default settings as shown in following example:

Main.java:

import java.awt.event.*;
import javax.swing.*;
import java.util.*;
import java.awt.*;
 
public class Main extends JFrame {
   public Main() {
      super("JToolTip Delay Demonstration");
 
      getContentPane().setLayout(new FlowLayout()); 
 
      JLabel label = new JLabel("How was I?");
      label.setToolTipText("too commercial");
 
      ToolTipManager toolTipManager = ToolTipManager.sharedInstance(); 
 
      // time to wait before showing tooltip when mouse enters component
      toolTipManager.setInitialDelay(20);
 
      // time to wait before dismissing tooltip (but overridden if
      // mouse moves outside of components bounds)
      toolTipManager.setDismissDelay(1000);
 
      // time to wait before showing tooltip when mouse re-enters component
      toolTipManager.setReshowDelay(10000); 
   
      getContentPane().add(label);
 
      addWindowListener(new WindowAdapter() {
         public void windowClosing(WindowEvent e) {
            System.exit(0);
         }
      });
 
      setSize(400, 300);
   }
 
   public static void main(String[] args) {
      Main main = new Main();
      main.setVisible(true);
   }
}