progressBar.setPreferredSize(new SDimension(200, 5));
progressBar.setPreferredSize(new SDimension(250,-1)); progressBar.setProgressBarDimension(new SDimension(250,12));
    public SComponent createExample() {        final SButton forward1Percent = new SButton("+1");        final SButton forward10Percent = new SButton("+10");        final SButton backward1Percent = new SButton("-1");        final SButton backward10Percent = new SButton("-10");        final SProgressBar progressBar = new SProgressBar(0, 100);        ActionListener al = new ActionListener() {            public void actionPerformed(ActionEvent e) {                int valueChange = 0;                if (e.getSource() == forward1Percent) {                    valueChange = 1;                } else if (e.getSource() == forward10Percent) {                    valueChange = 10;                } else if (e.getSource() == backward1Percent) {                    valueChange = -1;                } else if (e.getSource() == backward10Percent) {                    valueChange = -10;                } // end of if ()                progressBar.setValue(progressBar.getValue() + valueChange);            }        };        forward1Percent.addActionListener(al);        forward10Percent.addActionListener(al);        backward1Percent.addActionListener(al);        backward10Percent.addActionListener(al);        progressBar.setUnfilledColor(java.awt.Color.gray);        progressBar.setFilledColor(java.awt.Color.red);        progressBar.setForeground(java.awt.Color.red);        progressBar.setBorderColor(java.awt.Color.black);        progressBar.setStringPainted(true);        progressBar.setPreferredSize(new SDimension(200, 5));        progressBar.setValue(20);        SContainer panel = new SPanel();        try {            java.net.URL templateURL = getSession().getServletContext().getResource("/templates/ProgressBarExample.thtml");            STemplateLayout layout = new STemplateLayout(templateURL);            panel.setLayout(layout);        } catch (Exception ex) {            ex.printStackTrace();        }        panel.add(progressBar, "ProgressBar");        panel.add(forward1Percent, "Forward1Percent");        panel.add(forward10Percent, "Forward10Percent");        panel.add(backward1Percent, "Backward1Percent");        panel.add(backward10Percent, "Backward10Percent");        return panel;    }