populationLabel = new Label(Integer.toString(populationSize));
panel.add(new Label("Population Size", Label.RIGHT));
panel.add(new Scrollbar(Scrollbar.HORIZONTAL, populationSize, 1,
MIN_POPULATION_SIZE, MAX_POPULATION_SIZE) {
{
addAdjustmentListener(new AdjustmentListener() {
public void adjustmentValueChanged(AdjustmentEvent evt) {
populationSize = getValue();
populationLabel.setText(Integer.toString(getValue()));
populationLabel.repaint();
}