(String text)
| 263 | } |
| 264 | |
| 265 | String zapGremlins(String text) { |
| 266 | char[] chars = new char[text.length()]; |
| 267 | chars = text.toCharArray(); |
| 268 | int count=0; |
| 269 | for (int i=0; i<chars.length; i++) { |
| 270 | char c = chars[i]; |
| 271 | if (c!='\n' && c!='\t' && (c<32||c>127)) { |
| 272 | count++; |
| 273 | chars[i] = ' '; |
| 274 | } |
| 275 | } |
| 276 | if (count>0) |
| 277 | return new String(chars); |
| 278 | else |
| 279 | return text; |
| 280 | } |
| 281 | |
| 282 | public void keyTyped (KeyEvent e) {} |
| 283 | public void keyReleased (KeyEvent e) {} |