Reputation: 718
In jtextfield, One can restrict the inputs of an jtextfield by overriding the insertString method of document. How can i do these in awt textfield? How can i filter the inputs of an awt textfield?
Upvotes: 1
Views: 215
Reputation: 109823
One can restrict the inputs of an jtextfield by overriding the insertString method of document.
AWT TextField
, you can to add DocumentListener only to Swing JTextComponentsjtextfield by overriding the insertString method of document.
DocumentFilter
for Swing JTextComponent
sHow can i do these in awt textfield? How can i filter the inputs of an awt textfield?
for AWT TextField
you can use
Upvotes: 1