test/jdk/javax/swing/plaf/metal/MetalUtils/bug6190373.java
changeset 49090 82c1fe23c469
parent 47216 71c04702a3d5
equal deleted inserted replaced
49089:149647adb633 49090:82c1fe23c469
     1 /*
     1 /*
     2  * Copyright (c) 2005, 2015, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   100 
   100 
   101     private static void setLookAndFeel(final UIManager.LookAndFeelInfo laf) {
   101     private static void setLookAndFeel(final UIManager.LookAndFeelInfo laf) {
   102         try {
   102         try {
   103             UIManager.setLookAndFeel(laf.getClassName());
   103             UIManager.setLookAndFeel(laf.getClassName());
   104             System.out.println("LookAndFeel: " + laf.getClassName());
   104             System.out.println("LookAndFeel: " + laf.getClassName());
       
   105         } catch (final UnsupportedLookAndFeelException ignored){
       
   106             System.out.println("Unsupported LookAndFeel: " + laf.getClassName());
   105         } catch (ClassNotFoundException | InstantiationException |
   107         } catch (ClassNotFoundException | InstantiationException |
   106                 UnsupportedLookAndFeelException | IllegalAccessException e) {
   108                 IllegalAccessException e) {
   107             throw new RuntimeException(e);
   109             throw new RuntimeException(e);
   108         }
   110         }
   109     }
   111     }
   110 }
   112 }