I have already wasted far too much time on a stupid problem with Java. I have always used the Java Swing system for my displays. That, it turns out, has been a truly stupid mistake. I used Swing because, well, everybody said that it was “the only way to go”. The problem is that Swing’s fundamental design goal is to produce display windows that can automatically handle resizing and other changes. A good Swing window can accommodate contents that grow larger and smaller as the material changes. This is essential for any web application. It’s totally wrong for my work, because I don’t design applications for the web. What I need is a graphics system that permits direct control and fixed dimensions of the graphical elements. It just so happens that this is available in Java: it’s called AWT, and it’s been available from day one.
The Theater display suffers from all sorts of nonsense in the Swing implementation, and I’ve been fighting it all this time. Today, I attempted to redesign the whole thing to use only AWT. It didn’t work; AWT refuses to put margins on the text, which crams up against the edges of the window, making it difficult to read. Swing has a method for setting margins in text areas, but not AWT.
So I am left with three options: AWT and ugly text; Swing and graphic components that jump around in size most irritatingly; and using two windows for the graphic components. This latter strategy is the solution I’ll be working with for the next few days. I really want to put this problem behind me so that I can return to actually working on LMD.
That evening…
Well, I think I got it working with the dual windows. It looks crappy but it works. Now at last I can get back to work on LMD.