This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Program becomes unresponsive after using while loop Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Program becomes unresponsive after using while loop" Watch "Program becomes unresponsive after using while loop" New topic
Author

Program becomes unresponsive after using while loop

Frederick Pease
Greenhorn

Joined: Aug 12, 2013
Posts: 3
I'm not sure what's making this happen, but something tells me it has to do with the loop. I hit the enter key which starts the program, then it doesn't stop when I press the button again.

Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19651
    
  18

Please read Concurrency in Swing. In short, this loop takes over the Event Dispatcher Thread completely.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
 
subject: Program becomes unresponsive after using while loop
 
Similar Threads
I Seriously Need Helps.. Ugently
Problem displaying..
Need to get data to appear in JTextField..
Won't repaint!
Prevent Duplicate value from jlist to jlist by way of a jbutton