Tablelayout: some people still has some common sense left in them.

I’ve spent almost all day trying to write a small piece of code that would generate a form using an archetype as input. I had everything written, accept the code that would create the form. Would be a no brainer, right? Well if it is java swing that you are using, that is not the case.

What I wanted was very simple, however the “powerful” layout engines in swing just would not let me do it. After spending hours cursing to gridbaglayout, I finally discovered tablelayout here.It works exactly it was meant to be. No catches, no smart tricks. It simply works. In case you want to save your own hours, just take a look at it.

And if you respond with “but gridbaglayout is sooo powerful”, I’ll punch you in the face.

Advertisements