user2146545
user2146545

Reputation:

Getting the value of the jtextfield and put it to label in another form

I have Jtextfield in one form and I want to get the value that I typed and put it in Jlabel in the other form? How can I do that?

Upvotes: 0

Views: 1365

Answers (1)

Toon Borgers
Toon Borgers

Reputation: 3658

To get the text:

String text = textField.getText();

And then set it on your label with

label.setText(text);

Upvotes: 1

Related Questions