jComboBox1.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(java.awt.event.ActionEvent evt) {
jComboBox1ActionPerformed(evt);
if (jComboBox1.getSelectedItem().equals(" "))
{
rlsum = addElement(sumthing );
}
if (jComboBox1.getSelectedItem().equals("S"))
{
rlsum = addElement(sumthing/64 );
}
if (jComboBox1.getSelectedItem().equals("Z"))
{
rlsum = addElement(sumthing/220 );
}
}
private Object addElement(double i) {
throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
}
});
我想知道如何在不每次都抛出的情况下读取变量 sumthing...