What does SwingUtilities.invokeLater do? [duplicate]

As other answers have said, it executes your Runnable on the AWT event-dispatching thread. But why would you want to do that? Because the Swing data structures aren’t thread-safe, so to provide programmers with an easily-achievable way of preventing concurrent access to them, the Swing designers laid down the rule that all code that accesses … Read more

Java and GUI – Where do ActionListeners belong according to MVC pattern?

That’s a very difficult question to answer with Swing, as Swing is not a pure MVC implementation, the view and controller are mixed. Technically, a model and controller should be able to interact and the controller and view should be able to interact, but the view and model should never interact, which clearly isn’t how … Read more