I am making a simple GUI program in java. In this program I have made a simple jFrame where there is two separate textField, one for user input number(data type: double) and another for square of the input number as answer.
What I want is:
The event action to be KeyTyped(ie displaying square for every single number entered through keyboard).
eg: entered number is 11 the answer should display 1 for first 1 ,
and 121 after 2nd 1 is entered.If wrong key is pressed eg a character 'g', then the wrong character 'g' is destroyed at the instance.
Hope I coud explain more clearly but if you get it, how can i do the same, any idea.
(Note: I am using Netbeans IDE 7.1)