I have little experience with Java Swing. I'd like to ask if my idea of combining layouts to obtain a responsive app is the way to go in order to create a semi-responsive Swing app ("semi-" in the sense it should look good given a minimal screen resolution, say 800 x 600 pixels).
1 Answers
Yes, that's the way to go in standard Java without Libraries.
Personal Opinion:
I personally really dislike the LayoutManagers delivered in Swing (apart from the simple Flow and Border Layouts). Therefore I use MigLayout to do most of the Layout. This avoids having to combine multiple LayoutManager
to position a single component. The learning curve might be a bit larger than with the simple Layouts, but I still think it's easier than GridBagLayout
and can do a LOT more.
Once you get it the code will be super clean, as it works with Layout Constraints that (when using String Constraints) kinda is a graphical representation of your Layout Settings.
Here's a guide to get you started: http://www.miglayout.com/QuickStart.pdf
And here you can look up the commands you can use: http://www.miglayout.com/whitepaper.html

- 373
- 5
- 17