💾 Archived View for freeshell.de › gemlog › 2021-11-20.gmi captured on 2022-06-11 at 21:03:28. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2022-03-01)

-=-=-=-=-=-=-

Making GUIs just for fun

My first goes at making a UI were in database packages like dBase. You could make menus, dialogs and other clickable things on an 80 by 25 text-only DOS screen. It seemed like a magical way to make software features discoverable and fun. Ooh, look, my popup has a drop shadow! The mouse is a reverse video character! I can draw things with box characters! I worked on systems that burned their main menu into the screen because that was all the users worked on, day in, day out.

I always liked desktop UIs, and I missed them when work things all became web-based. So my side project for several years has been a UI generator for Swing, the Java desktop toolkit.

I saw ew0k bemoaning the kind of GUI code that makes you build stuff with method calls, and wish for something more declarative:

Lightweight, Simple, and Cross-Platform GUI Programming?

I had the same feelings, and I built a thing where the layout code is a tree stucture in XML. When making a UI isn't hard, it becomes fun again. I've built a load of things just because I can, including a Gemini client.

A bonus with Swing is that it's cross platform. Stuff works on Windows and Linux... most of the time, any way. It might still work on a Mac too, but it's a long time since I had one of those for testing.

I'm not sure if it's in a fit state for anyone else to use. It seems ok to me, but maybe that's because I know it too well. It's open source and permissively licenced.

git clone https://git.code.sf.net/p/compositor/code compositor
cd compositor
mvn install

...then look at index.html

back to gemlog