2016年10月15日

textbox正则表达式校验

摘要: 1 private boolean isInteger(final String str) 2 { 3 final Pattern pattern = Pattern.compile("^[-\\+]?[\\d]*$"); 4 return pattern.matcher(str).matches(); 5 } 阅读全文

posted @ 2016-10-15 14:52 一个即将成为大牛的人 阅读(288) 评论(0) 推荐(0)

textbox校验---只能为正整数

摘要: for(inti=0;i<textbox.getValue().length();i++) { if(!Character.isDigit(textbox.getValue().charAt(i))) { Messagebox.show("输入的必须是正整数","提示",Messagebox.OK,Messa... 阅读全文

posted @ 2016-10-15 14:49 一个即将成为大牛的人 阅读(221) 评论(0) 推荐(0)

导航