SecurityTest2.java revision 0:37a05a11f281
1/*
2  @test
3  @bug 6599601
4  @summary tests that a simple GUI application runs without any
5exceptions thrown
6  @author Artem.Ananiev area=awt.Toolkit
7  @run main SecurityTest2
8*/
9
10import java.awt.*;
11
12public class SecurityTest2
13{
14    public static void main(String[] args)
15    {
16        System.setSecurityManager(new SecurityManager());
17
18        try
19        {
20            Frame f = new Frame();
21            f.setVisible(true);
22            f.dispose();
23        }
24        catch (Exception z)
25        {
26            throw new RuntimeException("Test FAILED because of some Exception thrown", z);
27        }
28    }
29}
30