Another way is to have a main class contain a JFrame member. This
is useful when you don't need to specialize the behavior of the
JFrame. The JFrame can also live as a local variable inside a
'main' or other method.
The question of extending (inheritance) vs. including (composition)
is part of the art.
That style is occasionally used.
But it seems as if extending JFrame is the most commonly
used model.
Maybe just because SUN created a lot of examples with that
model.[/QUOTE]
It surely influenced me, although the example I cited above was
generated by NetBeans. Two pitfalls I've seen with extending JFrame,
especially when re-factoring: it's easier to leak "this", and it's
harder to reuse the code.
FWIW, a colleague advocates using the designer more for the occasional
difficult panel, rather the for an entire application.