GroupLayout autogenerated code in NetBeans

后端 未结 1 668
北荒
北荒 2020-11-27 22:55

After almost 4 years in java programming I decided to learn how to write GUI classes by myself since until now I\'ve always used NetBeans GUI Editor (I\'m not particularly p

相关标签:
1条回答
  • 2020-11-27 23:34

    Kudos for embracing the NetBeans GUI designer as a means to—and not a substitute for—understanding Swing. Summarizing the comments,

    • While GroupLayout was designed for automated code generation, it can usefully be used manually, as shown here and here. It can also be integrated into the mixed development approach suggested here.

    • Experienced developers wisely suggest learning one or more popular third-party layouts such as MigLayout, FormLayout or DesignGridLayout, which derive some power from accepting human-readable text parameters. I see GroupLayout in the same category, but simply having a fluent interface.

    • In your example, the two layouts have differing resize behavior, which may impact other choices. Beware of this common pitfall.

    0 讨论(0)
提交回复
热议问题