File tree 1 file changed +2
-11
lines changed
1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -316,21 +316,12 @@ public void keyTyped(KeyEvent event) {
316
316
editField .setCaretPosition (start + 1 );
317
317
event .consume ();
318
318
319
-
320
319
} else if ((c == '_' ) || (c == '.' ) || ((c >= 'A' ) && (c <= 'Z' )) || ((c >= 'a' ) && (c <= 'z' ))) { // allow .pde and .java
321
320
// these are ok, allow them through
322
321
323
322
} else if ((c >= '0' ) && (c <= '9' )) {
324
- // getCaretPosition == 0 means that it's the first char
325
- // and the field is empty.
326
- // getSelectionStart means that it *will be* the first
327
- // char, because the selection is about to be replaced
328
- // with whatever is typed.
329
- if ((editField .getCaretPosition () == 0 ) ||
330
- (editField .getSelectionStart () == 0 )) {
331
- // number not allowed as first digit
332
- event .consume ();
333
- }
323
+ // these are ok, allow them through
324
+
334
325
} else {
335
326
event .consume ();
336
327
}
You can’t perform that action at this time.
0 commit comments