title: how do I use wait notify to stop pause a method while waiting on a button to be pressed in another class
body: <p>So using a GUI in java, I am trying to allow the user to press a transfer button which will initiate a method. This method will open up a separate GUI which will ask the user to enter information and then save it when the user has pressed a save button. What I want to do is pause the method after it has opened the separate GUI and continue once the user has hit the save button in that second GUI. Unless there is a better way, I believe that implementing a wait notify method is the best way to go about this but I have been unsuccessful thus far.</p>