+ if (e.getSource() instanceof JTextField){
+ JTextField s = (JTextField)e.getSource();
+ int num = Integer.parseInt(s.getText());
+ if (num < 0)
+ num = 0;
+ else if (num > 127 && s != length)
+ num = 127;
+ s.setText(new Integer(num).toString());
+ }