Constructor: set up the GUI
Panel p = new Panel();
p.add(new Label("Number:"));
p.add(textField = new TextField(10));
add(BorderLayout.NORTH, p);
textField.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent ev) {
String s = textField.getText();
statusLabel.setText(process(s).toString());
}
});
add(BorderLayout.SOUTH, statusLabel = new TextField(10));
pack();