@@ -28,12 +28,13 @@ All of them try more or less
2828
2929When you develop a Java Swing GUI in practice, you face the following additional challenges
3030
31- * how to enforce the proper threading (view elements like JPanel, JButton, ... should be only accessed by AWT-EventDispatchThread)
32- * how to keep the view "responsive" by kicking off background actions (-> SwingWorker, new Thread(...), ExecutorService, ...)
33- * how to combine the results from multiple asynchronous actions (multiple SwingWorker's, Thread's, Future's, ...) into one result for the view
34- * how to implement Undo/Redo, Validation, Exception-Handling, Timeouts, ...
35- * how to enforce acyclic relationships between "stuff" to get good (isolated) testability
36- * how to connect an ActionListener on e.g. a "Cancel" button with a just started SwingWorker and disconnect it after the SwingWorker finished
31+ * how to enforce the proper threading (view elements like JPanel, JButton, ... should be only accessed by AWT-EventDispatchThread)?
32+ * how to keep the view "responsive" by kicking off background actions (-> SwingWorker, new Thread(...), ExecutorService, ...)?
33+ * how to combine the results from multiple asynchronous actions (multiple SwingWorker's, Thread's, Future's, ...) into one result for the view?
34+ * how to implement Undo/Redo, Validation, Exception-Handling, Timeouts, ...?
35+ * how to enforce acyclic relationships between "stuff" to get good (isolated) testability?
36+ * how to deal with backpressure when e.g. the backend is to fast for the frontend and the GUI thread can't keep up?
37+ * how to connect an ActionListener on e.g. a "Cancel" button with a just started SwingWorker and disconnect it after the SwingWorker finished?
3738* ...
3839
3940So, which GUI architecture should you choose? What are the benefits and drawbacks in general? And for your current project?
0 commit comments