Java GUI Managers / Tools

It has been more as 10 years ago I used javax.swing. Recently I had to change something in a Swing application.

I totally forgot how these things worked. If they ever work…. It felt like trying to build a HTML 4 website with <table> elements and frames but worse. Or designing a user interface in an Excel sheet.

As it turns out. I was trying to adapt the current implementation that was created with JFormDesigner. I shouldn’t have tried to adapt the design with it. It destroyed my mood for a whole week.

The designer thingy was a version from 2012 due to the lack of a license for the new version. I attempted to use it. I had to retrieve an intelliJ version 2012 to be able to get it running. ( Or could have used an Eclipse from 2018, but the choice here was obvious… JetBrains! )

Attempting to mingle the new design into the existing one resulted in an even worse user interface than the original, not only for the users eye. But also for the coder. The amount of auto-generated code was absurd, outdated Java 5 or 4 and impossible to adapt yourself. Ok.. one could say, you don’t need to change the auto-generated code in a IDE, you do that with the designer.. but you like to have some sort of clean code, don’t you?

The worst was that for ever label or panel, or row or column you add on the UI manager a bunch of other elements shifted or got cramped into another cell making them teeny tiny small and impossible to select in the Designer tool. Forcing you to go an search for the x,y coordinates and manually change them.

At the near end of the week I almost got so fed up with it I was about to call in sick. But instead decided to throw it all away and started the whole thing from scratch. I should have done that from day one. It would have taken 2 days for the whole thing instead of 6 ( of which 4 wasted). Although I’m pretty sure that the same page in HTML and CSS would take me a half day. ( Ok.. I confess I would need an extra day to rewrite couple of remote EJB calls, but that’s a good evolution. I think we all agree on that? )

The days of Swing Java clients is over. Look ahead to newer tech that has more wide support and can also run on many platforms. Like electron.js for example. Also fat desktop clients that use remote EJB’s are surely not from this time.

Disclaimer: this experience could be triggered by my current knowledge on Java GUI Programming being buried somewhere deep away in my mind.

%d bloggers like this: