如何使其正确或改善?

时间:2019-07-20 04:42:38

标签: java

extraServicesactionPerform的值正在堆积(当我执行class AddAssignment implements ActionListener { public void actionPerformed(ActionEvent event) { //Get Campus String campusName = (String) campusComboBox.getSelectedItem(); //Get Extra Service String extraServices = ""; if(pickCheckBox.isSelected()) { extraServices = pickCheckBox.getText(); } if(dropCheckBox.isSelected()) { extraServices = dropCheckBox.getText(); } //Get Program String selectedProgram =""; if(eslButton.isSelected()) { selectedProgram = eslButton.getText(); } if(spButton.isSelected()) { selectedProgram = spButton.getText(); } finalAssignment = campusName + "/" + selectedProgram + "/" + extraServices; resultArea.append(finalAssignment + "\n"); } } 时)

nav {
   position: relative;
   max-width: 600px;
}
.logo {
   position: absolute;
   left: 50%;
   transform: translateX(-50%);
}

当我单击“按钮(actionPerformed)”时,这些值以某种方式累积。当我按下按钮时,它应该是一个不同的值。

0 个答案:

没有答案