KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > MacTest


1
2 import org.swixml.SwingEngine;
3
4 import javax.swing.*;
5 import java.awt.event.ActionEvent JavaDoc;
6 import java.awt.event.WindowEvent JavaDoc;
7 import java.awt.event.WindowAdapter JavaDoc;
8 import java.io.IOException JavaDoc;
9
10 import com.apple.eio.FileManager;
11
12 /**
13  * The HelloMac class shows a couple of the Mac specifics exposed
14  * <code>HeeloMac</code> renders the GUI, which is described in hellomac.xml
15  *
16  * @author <a HREF="mailto:wolf@paulus.com">Wolf Paulus</a>
17  * @version $Revision: 1.1 $
18  *
19  * @since swixml 1.1
20  */

21 public class MacTest extends WindowAdapter JavaDoc {
22   private static SwingEngine swix;
23
24   private MacTest() throws Exception JavaDoc {
25     swix= new SwingEngine( this );
26     swix.render( "xml/mactester.xml" );
27     swix.getRootComponent().setVisible( true );
28   }
29
30   
31   //
32
// Make the class bootable
33
//
34
public static void main( String JavaDoc[] args ) throws Exception JavaDoc {
35     new MacTest();
36   }
37
38 /**
39  * @return
40  */

41 public static SwingEngine getSwix() {
42     // TODO Auto-generated method stub
43
return swix;
44 }
45
46
47 }
Popular Tags