title: Wait & Notify among different Classes method
body: <p>Though my actual problem is bit different , solving the following problem will help me . 
   I have built a simple javafx application with scenebuilder . I would like to take input from user via a textField in my application and print that one in another class Say, class A. How can i make a thread, in class A, wait until my another guicontroller notify after getting value from user . I want to do this in a loop.</p>
  
  <p><strong>To be precise</strong>, How can i use wait and notify among  threads in  different classes ?</p>
  
  <p>Please pardon me for my scrappy question . thnx in advance</p>
  
  <p><strong>Edited:</strong> My actual program is to build a chat messenger . Where i have a  thread that will , after having the input from user , will forward to recipient . User will give input in a textField which will be handled in a guicontroller.</p>
  
  <p>I want my guiController to notify the Thread that is waiting for sending message.</p>
  
  <p>How can i do that  ?</p>