11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
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 javax.swing.*;
25 import java.awt.*;
26 import java.io.ByteArrayInputStream;
27 import java.io.ByteArrayOutputStream;
28 import java.io.ObjectInputStream;
29 import java.io.ObjectOutputStream;
30
31 /* @test
32 * @bug 8027152
33 * @summary Checks that ownedWindowList is serialized and deserialized properly and alwaysOnTop works after deserialization
34 * @author Petr Pchelko
35 * @run main OwnedWindowsSerialization
36 */
37 public class OwnedWindowsSerialization {
38
39 private static final String TOP_FRAME_LABEL = "Top Frame";
40 private static final String DIALOG_LABEL = "Dialog";
41 private static final String SUBDIALOG_LABEL = "Subdialog";
42
43 private static volatile Frame topFrame;
44 private static volatile Dialog dialog;
45 private static volatile Dialog subDialog;
46
47 public static void main(String[] args) throws Exception {
48 SwingUtilities.invokeAndWait(() -> {
49 topFrame = new Frame(TOP_FRAME_LABEL);
50 topFrame.setAlwaysOnTop(true);
51 dialog = new Dialog(topFrame, DIALOG_LABEL);
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
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 javax.swing.*;
25 import java.awt.*;
26 import java.io.ByteArrayInputStream;
27 import java.io.ByteArrayOutputStream;
28 import java.io.ObjectInputStream;
29 import java.io.ObjectOutputStream;
30
31 /*
32 * @test
33 * @key headful
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);
|