< prev index next >

test/jdk/javax/swing/JSpinner/WrongEditorTextFieldFont/FontByDefault.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2016, 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) 2016, 2018, 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.
*** 25,35 **** * @test * @key headful * @bug 6421058 * @summary Verify font of the text field is changed to the font of * JSpinner if the font of text field was NOT set by the user - * @run main bug6421058 */ import java.awt.Font; import javax.swing.JFrame; import javax.swing.JSpinner; --- 25,34 ----
*** 38,53 **** import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.plaf.UIResource; import static javax.swing.UIManager.getInstalledLookAndFeels; ! public class bug6421058 implements Runnable { public static void main(final String[] args) throws Exception { for (final UIManager.LookAndFeelInfo laf : getInstalledLookAndFeels()) { SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf)); ! SwingUtilities.invokeAndWait(new bug6421058()); } } @Override public void run() { --- 37,52 ---- import javax.swing.UIManager; import javax.swing.UnsupportedLookAndFeelException; import javax.swing.plaf.UIResource; import static javax.swing.UIManager.getInstalledLookAndFeels; ! public class FontByDefault implements Runnable { public static void main(final String[] args) throws Exception { for (final UIManager.LookAndFeelInfo laf : getInstalledLookAndFeels()) { SwingUtilities.invokeAndWait(() -> setLookAndFeel(laf)); ! SwingUtilities.invokeAndWait(new FontByDefault()); } } @Override public void run() {
< prev index next >