It doesn’t represent a large part of your
app, so it won’t show up in the taskbar
and it doesn’t have decorations. On Mac
OS X, it won’t show up in the Expose view
either. A JWindow is used for transient
things, such as drop-down menus and
combo boxes. Because our keyboard
overlay is not a large, functional part of
the app, using a JWindow is perfect.

Figure 2 shows what the final app looks
like. As I type into any text field or press
menu shortcut keys, the most recent keystroke appears in the overlay window.

Fancy Pop-Down Menus
In the old days of windowing interfaces,
we had a fairly small number of UI
controls: buttons, sliders, checkboxes,
scroll bars, and menus. That was pretty
much it. Today we have many, many
kinds of custom controls that behave in
lots of different ways.