Hello,

I basically have 2 GUI windows in my project.

Just to explain it better, let's call the 2 GUI windows:
- Window A
- Window B

In Window A, there is a variable that I want to change, but I have to change the value of the variable in Window A from a JTextField in Window B.

How can I do this?

Thanks.

by calling a method from Window A, from within Window B, passing the new value as a parameter and passing it to a set-method

by calling a method from Window A, from within Window B, passing the new value as a parameter and passing it to a set-method

Excellent, thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.