< prev index next >

test/jdk/javax/swing/JButton/4796987/bug4796987.java

Print this page
rev 51542 : 8210039: move OSInfo to top level testlibrary
Reviewed-by: duke

@@ -26,31 +26,32 @@
  * @bug 4796987
  * @requires (os.family == "windows")
  * @summary XP Only: JButton.setBorderPainted() does not work with XP L&F
  * @author Alexander Scherbatiy
  * @library ../../regtesthelpers
- * @library ../../../../lib/testlibrary
+ * @library /test/lib
  * @modules java.desktop/com.sun.java.swing.plaf.windows
  *          java.desktop/sun.awt
- * @build jdk.testlibrary.OSInfo
+ * @build jdk.test.lib.OSVersion jdk.test.lib.Platform
  * @build Util
  * @run main bug4796987
  */
 
-import jdk.testlibrary.OSInfo;
+import jdk.test.lib.Platform;
+import jdk.test.lib.OSVersion;
 import java.awt.*;
 import javax.swing.*;
 import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
 
 public class bug4796987 {
 
     private static JButton button1;
     private static JButton button2;
 
     public static void main(String[] args) throws Exception {
-        if (OSInfo.getOSType() == OSInfo.OSType.WINDOWS
-                && OSInfo.getWindowsVersion() == OSInfo.WINDOWS_XP) {
+        if (Platform.isWindows()
+                && OSVersion.current().equals(OSVersion.WINDOWS_XP)) {
             UIManager.setLookAndFeel(new WindowsLookAndFeel());
             testButtonBorder();
         }
     }
 
< prev index next >