UIManager.setLookAndFeel(lookAndFeel1);
} catch (ClassNotFoundException e) {
} catch (UnsupportedLookAndFeelException e) {
} catch (Exception e) {
}
ComponentUI ui1 = button1.getUI();
ComponentUI ui2 = button2.getUI();
ComponentUI ui3 = panel1.getUI();
ComponentUI ui4 = panel2.getUI();
assertTrue(ui1.getClass().getName().endsWith("MetalButtonUI"));
assertTrue(ui2.getClass().getName().endsWith("MetalButtonUI"));
assertTrue(ui3.getClass().getName().endsWith("BasicPanelUI"));
assertTrue(ui4.getClass().getName().endsWith("BasicPanelUI"));
button1.setUI(null);
button2.setUI(null);
panel1.setUI(null);
panel2.setUI(null);
SwingUtilities.updateComponentTreeUI(panel1);