954,554 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Changing Variable in another class?

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.

sharkbate24
Newbie Poster
3 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

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

stultuske
Posting Sensei
3,137 posts since Jan 2007
Reputation Points: 1,114
Solved Threads: 433
 
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.

sharkbate24
Newbie Poster
3 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: