SPanel f = new SPanel(new SBorderLayout());
p.add(new SLabel("DocumentEvent: ")); p.add(documentEvent);  SButton button = new SButton("Submit"); p.add(button); p.add(actionEvent);  button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { actionEvent.setText("Button pressed"); } });  SForm f = new SForm(new SBorderLayout()); f.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { actionEvent.setText(actionEvent.getText() + " + form event"); } });  controls.addSizable(textField); controls.addSizable(textArea);
    public SComponent createExample() {        controls = new ComponentControls();        SPanel p = new SPanel(new SGridLayout(2));        STextField textField = new STextField();        textField.setName("textfield");        p.add(createTextComponentExample(textField));        STextArea textArea = new STextArea();        textArea.setName("textarea");        p.add(createTextComponentExample(textArea));        SPanel f = new SPanel(new SBorderLayout());        f.add(controls, SBorderLayout.NORTH);        f.add(p, SBorderLayout.CENTER);        return f;    }