documentfilter Questions
2
Solved
EDIT - added at then end of the post the answer we were able to achieve
This is my first post in SO, so i hope i can ask everything right!
I searched and didn't quite find a answer to my question...
Ibson asked 19/7, 2014 at 20:14
7
here's the code that i have on how to limit the character input length
class JTextFieldLimit extends PlainDocument {
private int limit;
// optional uppercase conversion
private boolean toUpperc...
Hendricks asked 9/10, 2012 at 4:55
1
Solved
I figure this must be a simple mistake in the code or a misunderstanding on my part, but I cannot get a DocumentFilter to detect insertString events. Below is a simple filter for upper case letters...
Dowson asked 18/7, 2015 at 3:24
1
Solved
I've implemented a DocumentFilter subclass, and when I type text into the JTextComponent, the replace() method of the filter is invoked, and not insertString() (which is never invoked). Any idea wh...
Burchell asked 7/5, 2014 at 18:25
1
Solved
I am using a DocumentFilter on a JTextField which is used to enter in the amount of time an employee has worked. the filter is to ensure that the limit of input is only 4 characters long and to onl...
Theobald asked 6/5, 2014 at 18:4
2
Solved
I want to have a method like this on my DocumentFilter
public void replaceUpdate(int offset, int length, String text) {
try {
super.replace(byPass, offset, length, text, null);
} catch (BadLoca...
Marquis asked 19/2, 2012 at 1:13
2
Solved
Qestion First: I need to regex to match 111 or 111. or 111.111 (just aritrarty numbers) for a DocumentFilter. I need the user to be able to input 111. with a decimal and nothing afterwards. Can't...
Steere asked 11/2, 2014 at 14:27
1
Solved
How to limit the number of characters entered in a JTextField using DocumentListener?
Suppose I want to enter 30 characters max. After that no characters can be entered into it. I use the followin...
Zabrine asked 10/10, 2012 at 5:58
3
Solved
I'm trying to create a math quiz and I only want the user to be able to enter numbers whether they're negative or positive. Is there any way to do so? I've thought of using Regular Expressions but ...
Gilligan asked 5/11, 2011 at 2:45
1
© 2022 - 2024 — McMap. All rights reserved.