1 
2 import org.swixml.SwingEngine;
3 
4 import javax.swing.*;
5 import java.awt.event.ActionEvent;
6 import java.awt.event.WindowAdapter;
7 
8 
16
17public class InitClass extends WindowAdapter {
18  public Action DO_SELECT = new AbstractAction() {
19    public void actionPerformed(ActionEvent e) {
20      System.out.println( ((JComboBox) e.getSource()).getSelectedItem().toString() );
21    }
22  };
23
24  private InitClass() throws Exception {
25    new SwingEngine( this ).render( "xml/initclass.xml" ).setVisible( true );
26  }
27
28  public static void main(String[] args) {
29    try {
30      new InitClass();
31    } catch (Exception e) {
32      e.printStackTrace();
33    }
34  }
35}
36
37