Answer the question
In order to leave comments, you need to log in
How to remove all values except numbers from a string variable?
When you start the program, a window opens in which you can enter text, you need to somehow remove all the characters ( that the user entered ) except for numbers from this field (or a variable into which data is written from the field), how can this be done?
Answer the question
In order to leave comments, you need to log in
You can define a PlainDocument or DocumentListener that accepts only numbers and hang it on the input field.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question