Re: Frustrated by AWT..need some help
JT wrote:
Mark, I'm just curious... how did you know what to add once Netbeans
created the shell for you?
I'm not sure what you are asking here. The Matisse tutorial goes into
the mechanical details of creating stuff. If you mean, "how did I know
I needed a JFrame?," well, you just have to know Swing. Swing has three
(I think) top level components. They are JWindow, JFrame, and JDialog.
JWindows are "undecorated" windows, usually used for splash screens and
the like; that's not what I want. A JDialog is usually a sub-window in
an applications, sometimes it's modal too. Regardless, I don't want a
sub-window, this is the first window (only window) my app is going to
create.
JFrame is all that remains, and also it's a general rule: a JFrame is
your apps top level window. So I've narrowed it down by process of
elimination and also a heuristic that tells me JFrame is my best choice.
If you need to brush up on your Swing concepts, try here:
(These links add JApplet as a top level container, which I never use
because I don't make applets.)
http://java.sun.com/docs/books/tutorial/ui/features/compWin.html
(Scroll down to the "Top level containers" section.)
and:
http://java.sun.com/docs/books/tutorial/uiswing/components/toplevel.html
Lew and Daniel got your other question. Regarding your other post what
you changed: if it works, do it. ;-)