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.

I know, it’s just a letter

Whenever seeing an interface that starts with I, my stomach twists and sort of explosion build up starts to happen in my inner self.

Unable and perhaps unwilling to comprehend why one puts an I before am interface name.

Say you have an Installable, you’d have an IInstallable? Try to read it. Or an IEyeColor. Both sound very seaman style. Aye aye captain. Say you are writing a word-processor and when you make a Paddable, something you can pad left or right, you have an IPaddable ?

Or IPhone…. thus Landline implements IPhone, SamsungS8 implements IPhone ? Seriously..

All IDE’s have visual indications enough that stuff is an interface or an abstract class. Besides you don’t really need to know that you are using an interface. You need to know it’s contract and program to that. What you should be using elsewhere is the interface and not an implementation. Thus name your interfaces sensible and useful to read. Skip the I, (there is no I in team)

Swagger-Jaxb 1.8 released

Small update, forgot to inform you.

As the title states. I released swagger-jaxb 1.8.

The changes are community made and

  • refactor the code for easier use with https://github.com/icellmobilsoft/openapi-jaxb
  • document usage with gradle

%d bloggers like this: