level 1
as_liulin
楼主
String countryName=this.jTextFieldCountryName.getText().trim();
if(countryName!=null && !countryName.equals( " ")){
this.imageVector.add(countryName);
this.jLabelActionMessage.setText( "你将 "+countryName+ "添加到列中 ");
this.jListCountryList.setListData(this.imageVector);
}else{
this.jLabelActionMessage.setText( "请先输入内容再添加!!! ");
}
}
上面是一本书中的一部分代码,插入了包import java.util.Vector;但是在NetBeans6.9环境
中代码this.imageVector.add(cocountryName); 有问题了,imageVector已经不存在!该怎样用了?求各位高手帮我解决这个问题!不胜感激!!!!!!!!!!
2011年04月16日 16点04分
1
if(countryName!=null && !countryName.equals( " ")){
this.imageVector.add(countryName);
this.jLabelActionMessage.setText( "你将 "+countryName+ "添加到列中 ");
this.jListCountryList.setListData(this.imageVector);
}else{
this.jLabelActionMessage.setText( "请先输入内容再添加!!! ");
}
}
上面是一本书中的一部分代码,插入了包import java.util.Vector;但是在NetBeans6.9环境
中代码this.imageVector.add(cocountryName); 有问题了,imageVector已经不存在!该怎样用了?求各位高手帮我解决这个问题!不胜感激!!!!!!!!!!