I wish to overwrite getText() so that it can return a null value instead of a a blank value. I noticed that getText() is a part of JTextComponent and I’ve been unable to successfully overwrite it. What is the best way to get the desired result?
I wish to overwrite getText() so that it can return a null value instead
Share
You can subclass
JTextFieldand override thegetTextmethod, as suchOr you can inline the override, as such