This is a great feature, as it prevents mistakes and allows the generated code to be truly separated from the form's logic, even if it is written in the same class file. Further, the generated code is folded so that it can't be seen unless the developer really wishes to see it. No matter, NetBeans can't prevent me from changing the code outside the editor. This is relevant in case someone with a different editor decides to change the form by code, and in doing so, breaks the form's code.
Having done that, Matisse didn't even budge. Apparantly, Matisse keeps a .form file for every form the user creates. This file is an XML document representation of the original form, and Matisse uses this document when the form is edited and when the form's code is generated.
My Wishlist for Future Releases
These are my own speculations, or should I say ideas, about what should come in future releases of NetBeans in regards to Matisse. I think that the team developing Matisse has really done a great job with it, and that from here it can only keep improving in order to keep its supremacy among GUI editors.
Improved JavaBeans Binding
Ultimately, the form is simply a way to communicate with the user. JavaBeans are the instances containing the information communicated back and forth from the form, and having them easily bound to the form's controls is highly important.
I think that on top of the connections manager's option to connect between an event to a JavaBeans property, Matisse should offer a way to bind a JavaBeans property to a control's value.
I would go even further and suggest a wizard which generates a JavaBean from a group of controls on a form, and in so doing, separating the form's logic from the form's class file even more.
Better Support for Other Layouts
Matisse handles its own GroupLayout brilliantly, but fails to provide the same level of support for the original Java layout managers. In the future I would enjoy using Matisse in such a way that dragging a control onto a BoxLayouted panel would highlight the area the control would take, and maybe even move the controls already on that panel to show how it will look after placing the control.
Automatic Conversion From Other Layouts
Not every application is a new application, and some code is old, using a diversity of BoxLayout, GridBagLayout and FlowLayout to make a form fulfil its developer's desires. Matisse should allow for automatic conversion from these layouts to the new, free-form layout, by keeping old events and control names and keeping the form's old presentation by supplying automatically generated snaps to the controls.
Some Conclusions
It's obvious that to me, Matisse is the number one GUI editor for Java, and in more than one way, the number one GUI editor on all platforms. Considering the
past of NetBeans, starting out fresh with something like Matisse is just a sign for what's coming, and there's no doubt that even though I first looked at the new
NetBeans with scepticism, I'd be looking at the next release with anticipation.
About the Author
Aviad Ben Dov is a software designer and developer, working on enterprise applications in both .NET and Java. He is a long time user of both Visual Studio and IntelliJ IDEA.