标签: java swing jcomponent bluej jradiobutton
我尝试使用isChecked()方法来确定是否选择了单选按钮,并且收到错误消息“找不到符号&#39 ;;我导入了java.awt.event.*,所以不是这样!这可能是愚蠢的事情,但我真的卡住了!
isChecked()
java.awt.event.*
if (beginner.isChecked()) { difficultyMark = 1; } else if (normal.isChecked()) { difficultyMark = 2; } else { difficultyMark = 3; }