谁能告诉我怎么了?当我尝试运行该程序时,我不断收到 numberformatexception。这是我的动作监听器。
private class ButtonListener implements ActionListener
{
public void actionPerformed(ActionEvent e)
{
String actionCommand = e.getActionCommand();
String s = t2.getText();
int r = Integer.parseInt("s");
if (t1.getText().equals("1") && (r <= 19)){
JOptionPane.showMessageDialog(null, "sdskd");
}