|
|
|
@ -25,7 +25,7 @@ public class UIPositiveIntNumberField extends UINumberField {
|
|
|
|
|
public void insertString(int offset, String s, AttributeSet a) throws BadLocationException { |
|
|
|
|
String str = getText(0, getLength()); |
|
|
|
|
|
|
|
|
|
if (!s.matches("^[0-9\\-]+$")) { |
|
|
|
|
if (!s.matches("^[0-9]+$")) { |
|
|
|
|
Toolkit.getDefaultToolkit().beep(); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|