buttons[i].setToolTipText("Button " + i); buttons[i].setName(buttons[i].getText()); buttons[i].setShowAsFormComponent(false); controls.addSizable(buttons[i]);
    SContainer createButtonExample() {        SButton[] buttons = new SButton[9];        for (int i = 0; i < buttons.length; i++) {            buttons[i] = new SButton("text " + (i + 1));            buttons[i].setActionCommand(buttons[i].getText());            if (i != 4) {                buttons[i].setIcon(icon);                buttons[i].setDisabledIcon(disabledIcon);                buttons[i].setRolloverIcon(rolloverIcon);                buttons[i].setPressedIcon(pressedIcon);                buttons[i].setToolTipText("Button " + i);                buttons[i].setName(buttons[i].getText());                buttons[i].setShowAsFormComponent(false);                controls.addSizable(buttons[i]);            }        }        buttons[0].setVerticalTextPosition(SConstants.TOP);        buttons[0].setHorizontalTextPosition(SConstants.LEFT);        buttons[1].setVerticalTextPosition(SConstants.TOP);        buttons[1].setHorizontalTextPosition(SConstants.CENTER);        buttons[2].setVerticalTextPosition(SConstants.TOP);        buttons[2].setHorizontalTextPosition(SConstants.RIGHT);        buttons[3].setVerticalTextPosition(SConstants.CENTER);        buttons[3].setHorizontalTextPosition(SConstants.LEFT);        buttons[4].setVerticalTextPosition(SConstants.CENTER);        buttons[4].setHorizontalTextPosition(SConstants.CENTER);        buttons[5].setVerticalTextPosition(SConstants.CENTER);        buttons[5].setHorizontalTextPosition(SConstants.RIGHT);        buttons[6].setVerticalTextPosition(SConstants.BOTTOM);        buttons[6].setHorizontalTextPosition(SConstants.LEFT);        buttons[7].setVerticalTextPosition(SConstants.BOTTOM);        buttons[7].setHorizontalTextPosition(SConstants.CENTER);        buttons[8].setVerticalTextPosition(SConstants.BOTTOM);        buttons[8].setHorizontalTextPosition(SConstants.RIGHT);        SGridLayout grid = new SGridLayout(3, 3);        grid.setBorder(1);        SPanel b = new SPanel(grid);        final SLabel pressed = new SLabel("No button pressed");        ActionListener action = new ActionListener() {            public void actionPerformed(ActionEvent e) {                pressed.setText("Button \"" + e.getActionCommand() + "\" pressed");            }        };        for (int i = 0; i < buttons.length; i++)            buttons[i].addActionListener(action);        for (int i = 0; i < buttons.length; i++)            b.add(buttons[i]);        SPanel erg = new SPanel();        erg.add(b);        erg.add(new SLabel("<html><br />"));        erg.add(pressed);        return erg;    }