下面是我用来显示从 0 到 100 的仪表进度条的代码,同时计算来自网站的字数。当它完成计算字数时,即当它达到 100 时,我希望它显示一些文本。但是,使用下面的代码,我得到的只是else
打印的语句,因为在调用量规检查方法时它仍在计数。我该如何解决这个问题?
public void SetGauge(int value) {
this.gg_Progress.setValue(value);
}
public void GaugeCheck () {
if (this.gg_Progress.getValue() == 100) {
progress_Result.setText("The number of words from this website have been successfully counted");
}
else {
progress_Result.setText("The number of words has not been successfully counted");
}
}
if (command == Continue2) {
// write pre-action user code here
switchDisplayable(null, getReading());
// write post-action user code here
DelimiterCheck(tfd_Delimiter.getString());
this.Count();
this.GaugeCheck();
}