第二个问题,你只把tf添加了ActionEvent事件的监听
tf.addActionListener(this);
ta.addTextListener(this);
所以if(e.getSource() == tf)中的条件永远为假,怎么会执行呢
到是会执行
if(e.getSource() == tf)
{
ta.setText("");
}
这样ta里不老就是空的吗
tf.addActionListener(this);
ta.addTextListener(this);
所以if(e.getSource() == tf)中的条件永远为假,怎么会执行呢
到是会执行
if(e.getSource() == tf)
{
ta.setText("");
}
这样ta里不老就是空的吗
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货