package computer;
import java.awt.BorderLayout;
import java.awt.Button;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.event.*;
import java.awt.*;
public class Couputertest 
{
 int m;
 int j;
String s;
String str;
 int sum;
Couputertest()
{
final Button b[]=new Button[16];
final TextField t=new TextField(60);
Frame f=new Frame("计算器测试");
f.setSize(200, 200);
f.setVisible(true);
f.setLayout(new GridLayout( 4,5) );

f.add(t);
String srt[]={"0","1","2","3","4","5","6","7","8","9","+","-","*","/","=","清0"};
for (int i = 0; i < srt.length; i++)
{
 b[i]=new Button(srt[i]);
     f.add(b[i]);
}

for(int i=0;i<10;i++)
{
 b[i].addActionListener(new ActionListener()
 {
 public void actionPerformed(ActionEvent e)
 {

t.setText(t.getText()+((Button)e.getSource()).getLabel());

 }
 });
}


b[10].addActionListener(new ActionListener(){
 public void actionPerformed(ActionEvent e)
 {    
    
s="1";
t.setText(" ");
str=t.getText()+((Button)e.getSource()).getLabel();

 }

});


b[11].addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
{
s="2";
t.setText(" ");
str=t.getText()+((Button)e.getSource()).getLabel();

}
});
b[12].addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
{
s="3";
t.setText(" ");
str=t.getText()+((Button)e.getSource()).getLabel();

}
});
b[13].addActionListener(new ActionListener(){
public void actionPerformed(ActionEvent e)
{
s="4";
t.setText(" ");
str=t.getText()+((Button)e.getSource()).getLabel();

}
});
try {
b[14].addActionListener(new ActionListener(){

public void actionPerformed(ActionEvent e)
{
m=Integer.parseInt(str);
j=Integer.parseInt(t.getText()+((Button)e.getSource()).getLabel());
if(s=="1")
{

sum=j+m;
t.setText(""+sum);
}
else if (s=="2")
{

sum=j-m;
t.setText(""+sum);
}
else if (s=="3")
{

sum=j*m;
t.setText(""+sum);
}
else if (s=="4")
{

sum=j/m;
t.setText(""+sum);
}
}
});
}
catch(Exception e){
System.out.println(e.toString());
}

 b[15].addActionListener(new ActionListener()
 {
 public void actionPerformed(ActionEvent e)
 {

t.setText(" ");
 }
 
 });
 
   

f.addWindowListener(new WindowAdapter()
{
public void windowClosing(WindowEvent e)  
{
System.exit(0);
}

} );

}
//final static String str;
public static void main(String[] args)
{

new Couputertest();

}}
这个有什么问题 啊 为什么无法实现想要的功能  
m=Integer.parseInt(str);
这句有什么问题