关于JTextField.getText()明明设置了字符串为为什么取得的值为null
this.text_day=newJTextField(50);this.text_day.setText("1");this.getContentPane().add(...
this.text_day=new JTextField(50);
this.text_day.setText("1");
this.getContentPane().add(this.text_day);
String a=this.text_day.getText();
int day=Integer.parseInt(a); 展开
this.text_day.setText("1");
this.getContentPane().add(this.text_day);
String a=this.text_day.getText();
int day=Integer.parseInt(a); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询