Package javax.swing.plaf.metal

Examples of javax.swing.plaf.metal.MetalToolTipUI


  public void test(TestHarness harness
  {
    JButton button1 = new JButton("Test 1");
    button1.setMnemonic(KeyEvent.VK_B);
    JToolTip t1 = button1.createToolTip();
    MetalToolTipUI ui1 = (MetalToolTipUI) t1.getUI();
    harness.check(ui1.getAcceleratorString(), "Alt-B");

    JButton button2 = new JButton("Test 2");
    button2.setMnemonic(KeyEvent.VK_C);
    JToolTip t2 = button2.createToolTip();
    MetalToolTipUI ui2 = (MetalToolTipUI) t2.getUI();
    harness.check(ui2.getAcceleratorString(), "Alt-C");
    harness.check(ui1.getAcceleratorString(), "Alt-C");
    harness.check(ui1 == ui2);
  }
View Full Code Here

TOP

Related Classes of javax.swing.plaf.metal.MetalToolTipUI

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.