仪表 j2me 的 if 语句
下面是一些代码的一部分,它显示一个仪表,显示字计数器从 0 到 100 的进度,但是我不确定如何编写 if 语句来显示一些文本以显示成功的计数。我尝试过 if 语句“ if gg_Progress.value = 100 ”,我知道这是错误的,有谁知道它应该说什么。谢谢
public void SetGauge(int value) {
this.gg_Progress.setValue(value);
}
public void GaugeCheck () {
if gg_Progress.value = 100 {
string_Progress.setText("The number of words have been successfully counted");
}
}
Below is part of some code which displays a gauge which shows the progress from 0 - 100 of a word counter, however i am unsure how to code the if statement to display some text to show a successful count. I have had a go at the if statement " if gg_Progress.value = 100 " which i know is wrong, does anyone know what it should say. Thanks
public void SetGauge(int value) {
this.gg_Progress.setValue(value);
}
public void GaugeCheck () {
if gg_Progress.value = 100 {
string_Progress.setText("The number of words have been successfully counted");
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)