13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import sun.awt.SunToolkit;
25
26 import javax.swing.*;
27 import java.awt.*;
28 import java.io.ByteArrayInputStream;
29 import java.io.ByteArrayOutputStream;
30 import java.io.ObjectInputStream;
31 import java.io.ObjectOutputStream;
32
33 /* @test
34 * @bug 8027152
35 * @summary Checks that ownedWindowList is serialized and deserialized properly and alwaysOnTop works after deserialization
36 * @author Petr Pchelko
37 * @run main OwnedWindowsSerialization
38 */
39 public class OwnedWindowsSerialization {
40
41 private static final String TOP_FRAME_LABEL = "Top Frame";
42 private static final String DIALOG_LABEL = "Dialog";
43 private static final String SUBDIALOG_LABEL = "Subdialog";
44
45 private static volatile Frame topFrame;
46 private static volatile Dialog dialog;
47 private static volatile Dialog subDialog;
48
49 public static void main(String[] args) throws Exception {
50 SwingUtilities.invokeAndWait(() -> {
51 topFrame = new Frame(TOP_FRAME_LABEL);
52 topFrame.setAlwaysOnTop(true);
53 dialog = new Dialog(topFrame, DIALOG_LABEL);
|
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 import sun.awt.SunToolkit;
25
26 import javax.swing.*;
27 import java.awt.*;
28 import java.io.ByteArrayInputStream;
29 import java.io.ByteArrayOutputStream;
30 import java.io.ObjectInputStream;
31 import java.io.ObjectOutputStream;
32
33 /*
34 * @test
35 * @key headful
36 * @bug 8027152
37 * @summary Checks that ownedWindowList is serialized and deserialized properly and alwaysOnTop works after deserialization
38 * @author Petr Pchelko
39 * @run main OwnedWindowsSerialization
40 */
41 public class OwnedWindowsSerialization {
42
43 private static final String TOP_FRAME_LABEL = "Top Frame";
44 private static final String DIALOG_LABEL = "Dialog";
45 private static final String SUBDIALOG_LABEL = "Subdialog";
46
47 private static volatile Frame topFrame;
48 private static volatile Dialog dialog;
49 private static volatile Dialog subDialog;
50
51 public static void main(String[] args) throws Exception {
52 SwingUtilities.invokeAndWait(() -> {
53 topFrame = new Frame(TOP_FRAME_LABEL);
54 topFrame.setAlwaysOnTop(true);
55 dialog = new Dialog(topFrame, DIALOG_LABEL);
|