summaryrefslogtreecommitdiff
path: root/toolkit/test/accessibility/EventLogger.java
blob: de0b8e6aee9d582b257b6aa6d34fb2ffca21c911 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import javax.swing.JFrame;
import javax.swing.JScrollPane;

class EventLogger
{
    public static synchronized EventLogger Instance ()
    {
        if (maInstance == null)
            maInstance = new EventLogger();
        return maInstance;
    }

    private EventLogger ()
    {
        try
        {
            maFrame = new JFrame ();
            maLogger = new TextLogger ();
            maFrame.setContentPane (new JScrollPane (maLogger));

            maFrame.setSize (400,300);
            maFrame.setVisible (true);
        }
        catch (Exception e)
        {}
    }

    private static EventLogger maInstance = null;
    private JFrame maFrame;
    private TextLogger maLogger;
}