Visual Editor vs Manual code
I'm not sure how it uses other frameworks, but these questions are strictly about Java swing.
Is it better to use the Visual Editor for object placement or for manually placing object placements in the frame (Layout Managers or Zero Layouts)?
In my experience I have had a lot of problems using Visual editors when it comes to different screen resolutions or window resizing. Using manual code for object placement, I found that my GUIs behave much better regarding the screen size issue. However, when I want to change a small part of my GUI, it takes a lot more work compared to using the visual editor.
Just wondering what people thought about this?
a source to share
I never use a visual builder for my Swing UIs.
The ease of creating a new user interface usually becomes a pain point during software maintenance: some developers cannot easily modify existing screens (in particular if they have been manually changed for some reason); imposing a GUI creator on the people who are in charge of maintaining your software generally also means imposing their IDE, people may not have performance if they have to use an IDE they are not used to, or worse, what they don't like ...
Of course, manually creating user interfaces is expensive: understanding the complexity of the various LayoutManagers. However, there is a wide variety of Swing LayoutManagers (mostly open source), some of which are easy to use (and supported) and powerful.
Two examples:
- DesignGridLayout will work all window -like shapes and is not only easy to use (less than 1 hour to understand and use) but good user interfaces and is the only one (that I know) where you can "render" the shape of your user interfaces simply by reading the Java code.
- MigLayout is more powerful, but a little harder to use, and that won't stop you from developing ugly user interfaces; -)
One more point: NEVER use absolute positions / size in UIs, this looks for problems (your UIs might get truncated on some monitors / systems ...)
a source to share
I have personally used many graphic designers over the years - in Eclipse, NetBeans, IntelliJ. And I was never happy with the constraints they put and the code they created. In the end, I had so many customizations that using designers was interfering with my work rather than helping it. And then I found MigLayout - for me this piece of software - Godsend. I have managed to pull unnecessary complexity out of my Swing labs and allow me to design superior layouts with minimal effort. I don't think MigLayout is harder to use (like someone mentioned above) - it is, of course, harder than CSS.
Even if you don't like MigLayout, my advice is to stay away from GUI designers. A simpler alternative to MigLayout JGoodies Forms Layout (which MiG overrides), jide-oss contains some simple simple layouts. However, if you want to use a designer my advice would be - IntelliJ IDEA Forms + JGoodies Forms - imo it generates much nicer code and then says NetBeans Matisse.
a source to share