Java has three graphics libraries. The first, created back in the 1990s, was AWT. The second, cooked up in the early 2000s, was Swing. The third, released in the last few years, is JavaFX. Each one is better than the previous one. However, JavaFX is still in shakedown phase; it works pretty well, but there are still some kinks in the system and the documentation is still being improved. Swing is really hard to use, and as I discussed in the previous essay, it’s hard to use and its layouts don’t permit me to arrange the display in the fashion I require. This forces me all the way back to AWT. Now, I’m not averse to doing so; in some ways, my old-school approach to graphics is more comfortable with the low-level control I get with AWT.
However, the entire Storyteller software is written for Swing, so I would have to completely revise the graphics. I would also have to replace all the Swing components with AWT components. The current version uses 22 objects from the Swing library, from the following classes:
JComponent, JScrollPane, JButton, JDialog, JLabel, JTextArea, JMenu, JFileChooser, and JMenuBar
That’s a lot of stuff to replace. Fortunately, all of these have analogues in AWT, so I can integrate them into AWT in the first pass, then replace them as necessary in the second pass. There will still be catches. Swing JButtons have ToolTips, AWT Buttons don’t. Many AWT components lack the finer features of Swing components, such as variable opacity, variable borders, and differing alignments. I can live without these. I also lose keyboard mnemonics, a somewhat more painful loss, but I suppose that it’s acceptable.
What I find more difficult to contemplate is the replacement of all those Swing JPanels with AWT Panels.