I’m relatively new to java (specifically swing) and have recently been making some fairly simple applications, learning as I go. The latest one has lots of form components such as JLabels, JTextFields, JButtons, etc etc. All were placed in NetBeans using a visual builder. I have to say I’m not really taking to NetBeans and have really just been designing the GUI and copying the code straight to Eclipse.
My question is: Is it worth getting a very good understanding of GroupLayout and coding by hand (and therefore having more control over my GUI) or just continuing on as is?
I’d say it’s worth taking some time to understand
GroupLayoutif only because it’s always a good idea to understand what your IDE is doing. Knowing what goes on behind the scenes actually makes you more flexible, because if you wind up in a situation where you don’t have access to Netbeans, you’ll know how to replicate the layout it would have produced for you. Besides, after you’ve gotten a decent amount of experience, you’ll probably wind up saving time overall. You can often develop a simple GUI faster by hand than by using a visual editor, especially considering the time it takes you to copy and paste the code from Netbeans to Eclipse.And of course, learning how to use
GroupLayoutby hand will also make it easier for you to transition to any of the other layout managers Java offers, which in turn can lead to simpler code and even more time saved.