test/javax/swing/JSlider/6794831/bug6794831.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 29,50 **** */ import javax.swing.*; import javax.swing.plaf.basic.BasicSliderUI; import java.awt.image.BufferedImage; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; public class bug6794831 { private final CountDownLatch countDownLatch = new CountDownLatch(1); ! public static void main(String args[]) throws InterruptedException { new bug6794831().run(); } ! private void run() throws InterruptedException { ! SwingUtilities.invokeLater(new Runnable() { public void run() { for (UIManager.LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) { try { UIManager.setLookAndFeel(lookAndFeelInfo.getClassName()); } catch (Exception e) { --- 29,52 ---- */ import javax.swing.*; import javax.swing.plaf.basic.BasicSliderUI; import java.awt.image.BufferedImage; + import java.lang.reflect.InvocationTargetException; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; public class bug6794831 { private final CountDownLatch countDownLatch = new CountDownLatch(1); ! public static void main(String args[]) ! throws InterruptedException, InvocationTargetException { new bug6794831().run(); } ! private void run() throws InterruptedException, InvocationTargetException { ! SwingUtilities.invokeAndWait(new Runnable() { public void run() { for (UIManager.LookAndFeelInfo lookAndFeelInfo : UIManager.getInstalledLookAndFeels()) { try { UIManager.setLookAndFeel(lookAndFeelInfo.getClassName()); } catch (Exception e) {