Ok, I am trying to create a calculator type program that will solve for the extrema of the function that I input. In order to do this, I have to set the interval of which the function is on. This means that I have three different text fields, one for the equation, and two for the interval.
So, I can successfully input numbers into my equation field, but trying to input into the other two brings up problems. I know that if I click into either of the two text fields that it will gain focus. If I try and set the new text of the field by checking if it has focus or not, I never get a result because clicking a button always changes focus to the button.
TL;DR
How do I figure out which text field previously had focus so I can know to put the numbers into it.
EDIT: If there is a better way to input altogether, I would be very happy to know what it is.