Things To Do In Berlin When You're Waiting For A Train

It was 3AM this morning on the return trip from Poznan to Prague, which required a 5 hour lay over in Berlin. So around 3AM I found by accident that the 24-hours McDonald's at Berlin Ostbahnhof has a power point in one of its corners so that I could plug my laptop into it and via TMobile get on-line. (Though greatful for this accidental service, I still avoided partaking of McDonald's dubious cuisine.) Where I found this question on and cobbled together a fresh plugin, uploading it to the Plugin Portal right before my train continued its journey at 4:57:

The process was simple: find, in the NetBeans sources, the package containing the code for the Window Component wizard, copy it into your own new fresh module, tweak it, and voila:

It's not really a non-GUI window, of course, but a non-Matisse window. But let's agree to not quibble and split hairs at 3AM, OK. When you use the template above, you get exactly what you'd normally get, except no ".form" file, nor the code referencing it, i.e., the "initComponents()" is removed from the generated ".java" file.

A future version of NetBeans IDE should have the above functionality integrated into the Window Component wizard, i.e., when you create a new window, you should be able to specify whether Matisse support should be provided.


I don't think this should be an apisupport template. There are any number of templates for GUI-oriented things, not just in apisupport, and they all create GUI builder forms; it would be unwieldy to provide alternates for all of them. Anyway you would need to decide and understand in advance that you did not want to use the GUI builder.

Rather, any GUI builder form should have an option visible somewhere in the UI to "debuilderize" it: delete the \*.form file and remove guards in the \*.java. (You can of course do this in an external editor by hand.)

The UI would of course have to warn you that the conversion should be considered irreversible. (There are experimental tools to reconstruct a \*.form for a hand-edited GUI class, though most people would be using JGoodies Forms or MiGLayout, neither of which the NB GUI builder supports.)

Posted by Jesse Glick on May 14, 2010 at 02:31 AM PDT #

"debuilderize" would be great!

Posted by Geertjan on June 19, 2010 at 05:39 PM PDT #

Post a Comment:
  • HTML Syntax: NOT allowed

Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« July 2016