Java tutorial
//package com.java2s; public class Main { /** * By default a tooltip will disappear after 4 seconds. * @param dismissDelayMs How long to wait for a tooltip to disappear in milliseconds. * Value 0 or less is converted to "forever" (i.e. tooltip only disappears when mouse is moved). */ public static void tooltipLinger(int dismissDelayMs) { javax.swing.ToolTipManager.sharedInstance() .setDismissDelay(dismissDelayMs < 1 ? Integer.MAX_VALUE : dismissDelayMs); } }