Wait() notify() implementation
Dear Java lovers,
I am so thankful for this forum. I am new to the java world and its been just 3 months.. I am currently facing a situation in my program and would really appreciate some technical assistance.
I am using 3 classes. First called application.java contains the main method. The second class, Window.java, contains methods to firstly read a file using filechooser and then performing the necessary calculations and then a method to display some graphs. The final class, dialogClass.java, is a GUI which I would like to implement between the filechooser and the method which displays the graphs (because I want to display some information in the file on the GUI frame which would affect the charts display method) in the Window.java class. I realized that I had to use wait() in the window class right after calling the filechooser method and I tried to perform notify() in the ok Jbutton ActionPerformed event of the GUI frame in the dialogClass.java. But I got an error called illegalmonitorstateexception . I am stuck!!!
Do you have any solution or any better way to implement this??