|
1 | 1 | /* |
2 | | - * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
|
20 | 20 | * or visit www.oracle.com if you need additional information or have any |
21 | 21 | * questions. |
22 | 22 | */ |
23 | | -import javax.swing.JApplet; |
24 | 23 |
|
25 | 24 | /* |
26 | 25 | * @test |
27 | 26 | * @bug 8065098 |
| 27 | + * @library /java/awt/regtesthelpers |
| 28 | + * @build PassFailJFrame |
28 | 29 | * @summary JColorChooser no longer supports drag and drop |
29 | 30 | * between two JVM instances |
30 | | - * @run applet/manual=yesno bug8065098.html |
| 31 | + * @run main/manual bug8065098 |
31 | 32 | */ |
32 | | -public class bug8065098 extends JApplet { |
33 | 33 |
|
| 34 | +public class bug8065098 { |
| 35 | + private static final String INSTRUCTIONS = """ |
| 36 | + 1. Compile the java test JColorChooserDnDTest.java: |
| 37 | + > <path-to-the-tested-jdk>/bin/javac JColorChooserDnDTest.java |
| 38 | + 2. Run the first instance of the java test: |
| 39 | + > <path-to-the-tested-jdk>/bin/java JColorChooserDnDTest |
| 40 | + 3. Select a color in the color chooser. |
| 41 | + 4. Run the second instance of the java test: |
| 42 | + > <path-to-the-tested-jdk>/bin/java JColorChooserDnDTest |
| 43 | + 5. Drag and drop the selected color from the first color chooser |
| 44 | + preview panel to the second color chooser preview panel |
| 45 | + 6. If the color is dragged to the second color chooser, then the |
| 46 | + test passes. Otherwise, the test fails. |
| 47 | + """; |
| 48 | + |
| 49 | + public static void main(String[] args) throws Exception { |
| 50 | + PassFailJFrame.builder() |
| 51 | + .title("bug8065098 Test Instructions") |
| 52 | + .instructions(INSTRUCTIONS) |
| 53 | + .rows((int) INSTRUCTIONS.lines().count() + 2) |
| 54 | + .columns(40) |
| 55 | + .build() |
| 56 | + .awaitAndCheck(); |
| 57 | + } |
34 | 58 | } |
0 commit comments