All the Swing frames get “frozen” when wait() is called in Java
问题 I want to wait() the put() method called from the second thread which has been connected to the Server (Monitor). But when i do this, the whole GUI frames (Swing) including their elements get frozen aftr the second put() call. How to fix this? I want the second thread keep waiting till the first thread performs a get() which frees a slot. Thanks in advance. Here's my skeleton code: Server: Buffer<String> buf = new Buffer<String>(1); while(true){ //for each socket connected new ServerHandler(.