1 import org.swixml.SwingEngine;
2
3 import javax.swing.*;
4
5 public class HelloWorldnoAction {
6
9 private int clicks;
10
11
14 public JTextField tf;
15
16
19 public JLabel cnt;
20
21
24 public void submit() {
25
26 tf.setText(tf.getText() + '#');
27 cnt.setText(String.valueOf(++clicks));
28 }
29
30
31
34 private HelloWorldnoAction() throws Exception {
35 new SwingEngine(this).render("xml/helloworld.xml").setVisible(true);
36 }
37
38
41 public static void main(String[] args) throws Exception {
42 new HelloWorldnoAction();
43 }
44}
45
46