// As per JDK-8067348

import java.awt.Dimension;
import java.awt.GridBagLayout;

import javax.swing.JCheckBox;
import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.ToolTipManager;

public class Swing {
private static void createAndShowGUI() {
ToolTipManager.sharedInstance().setInitialDelay(0);
ToolTipManager.sharedInstance().setDismissDelay(10000);

JFrame.setDefaultLookAndFeelDecorated(true);

JFrame frame = new JFrame("HelloWorldSwing");
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);

JPanel panel = new JPanel(new GridBagLayout());

JCheckBox checkBox = new JCheckBox("test");
checkBox.setToolTipText("Tooltip");

panel.add(checkBox);
frame.add(panel);

frame.setPreferredSize(new Dimension(300, 300));

frame.pack();
frame.setVisible(true);
}

public static void main(String[] args) {
javax.swing.SwingUtilities.invokeLater(new Runnable() {
public void run() {
createAndShowGUI();
}
});
}
}