changeset 13611:4e21153399fb

8144488: Compilation fails on Jake for regtest javax/swing/JMenu/8067346/bug8067346.java Reviewed-by: alexsch, serb
author ssadetsky
date Fri, 18 Dec 2015 17:02:42 +0300
parents 666606b20107
children 9875b0022c68
files test/javax/swing/JMenu/8067346/bug8067346.java
diffstat 1 files changed, 9 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/javax/swing/JMenu/8067346/bug8067346.java	Wed Dec 16 15:29:57 2015 -0800
+++ b/test/javax/swing/JMenu/8067346/bug8067346.java	Fri Dec 18 17:02:42 2015 +0300
@@ -27,7 +27,6 @@
  @requires (os.family == "windows")
  @run main bug8067346
  */
-import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
 import java.awt.Insets;
 import javax.swing.JFrame;
 import javax.swing.JMenu;
@@ -56,9 +55,17 @@
                 bug8067346 test = new bug8067346();
                 try {
                     // set windows look and feel
-                    UIManager.setLookAndFeel(new WindowsLookAndFeel());
+                    String lnf =
+                           "com.sun.java.swing.plaf.windows.WindowsLookAndFeel";
+                    UIManager.setLookAndFeel(lnf);
                 } catch (UnsupportedLookAndFeelException e) {
                     runTest = false;
+                } catch (ClassNotFoundException e) {
+                    runTest = false;
+                } catch (InstantiationException e) {
+                    runTest = false;
+                } catch (IllegalAccessException e) {
+                    runTest = false;
                 }
                 if(runTest) {
                     test.createUI();