txtOutput.setBackground(Color.WHITE);
double score;
String output="";
score=Double.parseDouble(txtScore.getText());
if(score>=60){
output="考试通过";
txtOutput.setBackground(Color.green);
txtOutput.setText(output);
}else{
output="考试未通过";
txtOutput.setBackground(Color.red);
txtOutput.setText(output);
}
判断
最新推荐文章于 2023-06-08 19:56:01 发布