user733046
user733046

Reputation: 101

question regarding GUI in java

HOW TO pass the string input in GUI using JTextfield to other class in java.

Upvotes: 0

Views: 107

Answers (2)

user unknown
user unknown

Reputation: 36269

otherclass.setText (jTextField.getText ());

Upvotes: 2

Bala R
Bala R

Reputation: 109027

Considering the amount of details provided in the question, here is an approximate answer

String text = jTextField.getText();
OtherClass otherClass = new OtherClass(text);

Upvotes: 1

Related Questions