< prev index next >

test/javax/swing/plaf/aqua/CustomComboBoxFocusTest.java

Print this page

        

*** 20,32 **** * or visit www.oracle.com if you need additional information or have any * questions. */ /* @test ! @bug 8073001 @summary Test verifies that combo box with custom editor renders focus ring around arrow button correctly. @run main CustomComboBoxFocusTest */ import java.awt.AWTException; import java.awt.Component; --- 20,34 ---- * or visit www.oracle.com if you need additional information or have any * questions. */ /* @test ! @bug 8073001 8081764 @summary Test verifies that combo box with custom editor renders focus ring around arrow button correctly. + @library /lib/testlibrary + @build jdk.testlibrary.OSInfo @run main CustomComboBoxFocusTest */ import java.awt.AWTException; import java.awt.Component;
*** 48,64 **** import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.SwingUtilities; public class CustomComboBoxFocusTest { private static CustomComboBoxFocusTest test = null; ! public static void main(String[] args) { ! try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { test = new CustomComboBoxFocusTest(); } --- 50,74 ---- import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import javax.swing.SwingUtilities; + import jdk.testlibrary.OSInfo; + import javax.swing.*; public class CustomComboBoxFocusTest { + private static Class lafClass; private static CustomComboBoxFocusTest test = null; ! public static void main(String[] args) throws Exception { ! if (OSInfo.getOSType() != OSInfo.OSType.MACOSX) { ! System.out.println("Only Mac platform test. Test is skipped for other OS."); ! return; ! } ! lafClass = Class.forName(UIManager.getSystemLookAndFeelClassName()); ! UIManager.setLookAndFeel((LookAndFeel) lafClass.newInstance()); try { SwingUtilities.invokeAndWait(new Runnable() { public void run() { test = new CustomComboBoxFocusTest(); }
< prev index next >