11/*
2- * Copyright (c) 2008, 2018 , Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2008, 2025 , Oracle and/or its affiliates. All rights reserved.
33 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44 *
55 * This code is free software; you can redistribute it and/or modify it
2525 @test
2626 @key headful
2727 @bug 4041703 4096228 4025223 4260929
28- @summary Ensures that appletviewer sets a reasonable default focus for an Applet on start
28+ @summary Ensures that reasonable default focus is set correctly on start
2929 @library ../../regtesthelpers
3030 @build Util
31- @run main AppletInitialFocusTest
31+ @run main InitialFocusTest
3232*/
3333
3434import java .awt .Button ;
3737import java .awt .Robot ;
3838import test .java .awt .regtesthelpers .Util ;
3939
40- public class AppletInitialFocusTest extends Frame {
40+ public class InitialFocusTest extends Frame {
4141
4242 Robot robot = Util .createRobot ();
4343 Button button = new Button ("Button" );
4444
4545 public static void main (final String [] args ) throws Exception {
46- AppletInitialFocusTest app = new AppletInitialFocusTest ();
46+ InitialFocusTest app = new InitialFocusTest ();
4747 app .init ();
4848 app .start ();
4949 }
@@ -63,7 +63,7 @@ public void run() {
6363 robot .delay (1000 ); // delay the thread to let EDT to start dispatching focus events
6464 Util .waitForIdle (robot );
6565 if (!button .hasFocus ()) {
66- throw new RuntimeException ("Appletviewer doesn't set default focus correctly." );
66+ throw new RuntimeException ("default focus is not set correctly." );
6767 }
6868 }
6969 });
0 commit comments