限制文本框中只可以输入数字 JFoormattedTextField price= new JFormattedTextField(); price.addKeyListener(new NumberListener());//添加监听对象