1 import com.toedter.calendar.*;
2 import org.swixml.SwingEngine;
3 
4 import java.awt.event.WindowAdapter;
5 import java.awt.event.WindowEvent;
6 
7 public class CustomTags extends WindowAdapter {
8 
9 
10  public CustomTags() throws Exception {
11    SwingEngine swix = new SwingEngine(this);
12    swix.getTaglib().registerTag("Calendar", JCalendar.class);
13    swix.render("xml/customtags.xml").setVisible(true);
14  }
15
16  /**
17   * Invoked when a window is in the process of being closed.
18   * The close operation can be overridden at this point.
19   */
20  public void windowClosing(WindowEvent e) {
21    super.windowClosing(e);
22    System.exit(0);
23  }
24
25  //
26  //  Make the class bootable
27  //
28  public static void main(String[] args) throws Exception {
29    new CustomTags();
30  }
31}
32