Example usage for javax.swing ToolTipManager setLightWeightPopupEnabled

List of usage examples for javax.swing ToolTipManager setLightWeightPopupEnabled

Introduction

In this page you can find the example usage for javax.swing ToolTipManager setLightWeightPopupEnabled.

Prototype

public void setLightWeightPopupEnabled(boolean aFlag) 

Source Link

Document

When displaying the JToolTip, the ToolTipManager chooses to use a lightweight JPanel if it fits.

Usage

From source file:SwingTest.java

/**
 * main entry point for the application. Creates the parent JFrame, the
 * JMenuBar and creates the JPanel which is the application itself.
 *//*from  ww  w . j  av  a  2 s  .  com*/
public static void main(String[] args) {
    JPopupMenu.setDefaultLightWeightPopupEnabled(false);

    ToolTipManager ttm = ToolTipManager.sharedInstance();
    ttm.setLightWeightPopupEnabled(false);

    JFrame frame = new JFrame();

    SwingTest swingTest = new SwingTest();
    frame.setJMenuBar(swingTest.createMenuBar());

    frame.getContentPane().add(swingTest);
    frame.setSize(550, 550);
    registerWindowListener(frame);

    frame.setVisible(true);
}