1 import javax.swing.JFrame; 2 import javax.swing.JScrollPane; 3 4 class EventLogger 5 { 6 public static synchronized EventLogger Instance () 7 { 8 if (maInstance == null) 9 maInstance = new EventLogger(); 10 return maInstance; 11 } 12 13 private EventLogger () 14 { 15 try 16 { 17 maFrame = new JFrame (); 18 maLogger = new TextLogger (); 19 maFrame.setContentPane (new JScrollPane (maLogger)); 20 21 maFrame.setSize (400,300); 22 maFrame.setVisible (true); 23 } 24 catch (Exception e) 25 {} 26 } 27 28 private static EventLogger maInstance = null; 29 private JFrame maFrame; 30 private TextLogger maLogger; 31 } 32