Hello,
I made a GUI for a simple class that stores accountnumbers and customernames in an arraylist.
In the class I made a public String getAccountNumber(customername), this returns the accountnumber that is linked to a customer with "customername".
In the GUI I made a JTextField where one can provide a customername and a button that triggers the getAccountNumber with parameter: JTextField.getText().
However, it doesn't work with parameter: JTextField.getText(). When I type the name of the customer myself (hardcoded) it does work (???).
Is there something else I have to convert/... to pass the JTextField.getText() to my getter so it returns the result correctly?
Best regards,
Christophe