FileDocCategorySizeDatePackage
ToolTipsHack.javaAPI DocExample3879Mon Jan 09 11:02:00 GMT 2006None

ToolTipsHack

public class ToolTipsHack extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

        RepaintManager.setCurrentManager(new FullRepaintManager());
		System.out.println(" light = " + ToolTipManager.sharedInstance().isLightWeightPopupEnabled());
		ToolTipManager.sharedInstance().setLightWeightPopupEnabled(true);
		System.out.println(" light = " + ToolTipManager.sharedInstance().isLightWeightPopupEnabled());

        JButton button;
        
        
        JFrame frame = new JFrame("Tool Tips Hack");
        BoxLayout layout =  new BoxLayout(
            frame.getContentPane(),
            BoxLayout.Y_AXIS);
        frame.getContentPane().setLayout(layout);
        
        button = new CustomJButton();
        button.setText("Open");
        button.setToolTipText("Open an existing file");
        frame.getContentPane().add(button);
        
        button = new CustomJButton();
        button.setText("Save");
        button.setToolTipText("Save the currently open file");
        frame.getContentPane().add(button);
        
        
        frame.getContentPane().add(new JLabel("a label"));
        frame.getContentPane().add(new JLabel("a label"));
        frame.getContentPane().add(new JLabel("a label"));
        
        
        frame.pack();
		frame.setSize(400,400);
        frame.show();
		System.out.println(" light = " + ToolTipManager.sharedInstance().isLightWeightPopupEnabled());