title: GUI Threading in Java (and SwingUtilities)
body: <p>I'm making a simple game in Java using swing and am having problems with my GUI freezing up  sporadically (due to threading issues most probably) after a button press that is supposed to trigger a switch in JPanels.</p>
  
  <p>I posted a related thread <a href="https://stackoverflow.com/questions/9495360/gui-threading-in-java">here</a>, which has more details about the actual code I'm currently using (although I did update the countdown and get that working fine). From answers to that thread, it seems like using<code>SwingUtilities.invokeLater()</code> or <code>invokeAndWait()</code> might be what I need to solve the problem, but I'm not sure where in my code it is necessary or exactly how to implement it.</p>
  
  <p>I don't know that much about threading and could use any help (preferably somewhat detailed and with some sample code) that I can get. Let me know if any further details would be useful.</p>