--- old/test/javax/swing/JTabbedPane/7170310/bug7170310.java 2020-07-05 23:44:33.847307006 +0100 +++ new/test/javax/swing/JTabbedPane/7170310/bug7170310.java 2020-07-05 23:44:33.705306083 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2014, 2017, 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 @@ -38,11 +38,13 @@ /** * @test + * @key headful * @bug 7170310 * @author Alexey Ivanov * @summary Selected tab should be scrolled into view. * @run main bug7170310 */ + public class bug7170310 { private static final int TABS_NUMBER = 3; @@ -75,7 +77,7 @@ System.out.printf("Test passed"); } } finally { - frame.dispose(); + if (frame != null) { frame.dispose(); } } }