Decimal Format is not setting the value in text field correctly.
posted 7 years ago
I have a text field which will have only Integer (positive and negative values). So,I am using JFormattedtextField as shown below:-
The getFormatter(0 method is as follows:-
This makes me only type 0 to 9 and - sign iniside the text box.
My Problem:- I have already a neagtive value like"-1222" inside the text field [Now using if a set a value which is positive i.e "1234" then after that i see the result as"-1234" Here though my value was positive, it did not remove the negative sign What could be the problem not getting???
Is my formatter wrong??