1
2
3
4 package com.webstersmalley.ui;
5
6 import java.io.File;
7
8 import org.apache.log4j.Logger;
9 import org.apache.log4j.PropertyConfigurator;
10 import org.swixml.SwingEngine;
11
12
13 /**
14 */
15 public class SwiXMLFrame
16 {
17 private static Logger log = Logger.getLogger(SwiXMLFrame.class);
18 static
19 {
20 PropertyConfigurator.configure("log4j.properties");
21 }
22
23 public SwiXMLFrame(String filename)
24 {
25
26 File uiFile = new File("xml" + File.separator + filename);
27
28 try
29 {
30 log.debug("Launching " + filename + " UI");
31 new SwingEngine(this).render(uiFile).setVisible(true);
32 }
33 catch (Exception e)
34 {
35 log.error("Error launching UI", e);
36 }
37 }
38 }