This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, i'm trying to get a value from a text field after it has been edited but when ever i run the code it returns blank even if there is text edited it there. The first time you log in there is a default value but it can be edited.
Any ideas on why it doesn't return a value would be greatly appreciated.
possibly you have agentCodeF declared twice:
once as a class field - the one referenced by the listener
also as a local variable, local to the constructor (or whatever method you build the gui) - this is the one you see on the screen
remove the duplication, and agentCodeF.getText() should return it's value