Reputation: 3
I've tried to use:
jTextField1 + jTextField2 = getText());
But it only retrieved the text from one text box.
Upvotes: 0
Views: 84
Reputation: 108
You can not get the text of two JTextFields simultaneously, you can however get the text of one and concat it to the other.
See: JTextField.getText JavaDocs for more information.
Upvotes: 0
Reputation: 159774
Perhaps
String text = jTextField1.getText() + jTextField2.getText();
Upvotes: 1