Ask HN: Tips for modern Java Swing development?
I'm writing some utilities with Java Swing (I'm a Java dev working in a Java shop). Been away from it a while - what is the best app framework? I have settled on flat laf (https://www.formdev.com/flatlaf) but what about MVC/app support? I found Griffon. Anything else?
6 comments
[ 3.4 ms ] story [ 10.8 ms ] threadSo my big tip is to create a SwingController base class for any of your UI panes with the following methods:
Theres a bit more to it than that, since you want resetUI to update all of your components without triggering respondUI(). And you want all your components to be automatically configured to call respondUI() when there is user interaction.I’ve written one of these before, but I don’t have access to a public version anymore. I do all my current UI dev in a UI kit built on top of Swing. But here is what I use there that solves this problem:
https://github.com/reportmill/SnapKit/blob/master/src/snap/v...
My contact info is in my HN profile - send me a note, maybe we should connect on LinkedIn.