public ClimaticPopInitialiser(int population) {
populationSize = population;
panel = new Panel();
panel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
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();
}
}
);
}
}
);
panel.add(populationLabel);
}
ClimaticPopInitialiser.java 文件源码
java
阅读 21
收藏 0
点赞 0
评论 0
项目:Impro-Visor
作者:
评论列表
文章目录