You essentially use invokeLater() whenever you need to update the UI and your code is not being run directly in response to a UI event (i.e. it's not inside or called directly by an actionPerformed(), mousePressed() etc method). Typically, this means your program has started some thread in the background and that background thread needs to update the UI. Subtly, it also means at the very beginning of your progam before you've started up your UI.
Some articles I've written that may help you:
-
Threading with Swing
-
SwingUtilities.invokeLater() - further explanation and example