final SLabel pressed = new SLabel("no Button pressed");
for (int i = 0; i < buttons.length; i++) { 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);  SPanel erg = new SPanel();  SGridLayout grid = new SGridLayout(3, 3); grid.setBorder(1); SPanel b = new SPanel(grid);  final SLabel pressed = new SLabel("No button pressed");
    SContainer createButtonExample() {        SPanel text = new SPanel();        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<3; i++ ) {            SButton b = new SButton("text " + (i+1));            // b.setBorder(new SLineBorder(1));            b.addActionListener(action);            text.add(b);        }        text.add(new SLabel("<html><br />"));        text.add(pressed);        return text;    }