Re: Understanding modal dialogs
"MikeB" <MPBrede@gmail.com> wrote in message
news:1175554557.834647.144380@d57g2000hsg.googlegroups.com...
My question (sans a questionmark):
My real question:
I want to have a modal dialog, where a menu action on MainFrame
invokes SubFrame and I want MainFrame to not execute any more
statements until I close SubFrame.
Read
http://java.sun.com/docs/books/tutorial/uiswing/components/dialog.html ,
but first read my additional comments below:
[...]
Do you disapprove of using an IDE? The way you phrase your statement
above made me think you do. Could you tell me why you think using an
IDE is a bad thing?
I'm assuming you have a good grasp on the basic Java language
concepts. E.g. you know how to use while loops, for loops; You what import
statements are for; You understand the mechanics of how inheritance works,
even if you aren't always sure when to use it, etc.
I use an IDE (specifically, Eclipse), but I don't use it to generate
GUI code for me. All the GUI editors I've used tend to create regions of
source code (perhaps demarked by special comments) that you're not
supposed to touch. E.g. something like:
public class MyClass {
//BEGIN AUTOGENERATED CODE. DO NOT TOUCH!!!
JList jlist1, jlist2;
JButton jbutton1, jbutton2, jbutton3;
//END AUTOGENERATED CODE.
}
and I don't like the that. That's just a personal preference thing,
though, and you're free to use a GUI editor if you want.
However, I strongly recommend you learn how to make a GUI manually
first, BEFORE you start using your GUI editor. I think GUI editors are
still in the early, immature technology phase. Sometimes they'll break
down, or they won't do (and are incapable of doing) exactly what you want,
so you'll have to roll up your sleeves, and get your hands dirty, working
directly with the GUI code. Maybe in a few years, that'll change, and GUI
editors will improve, and working directly with GUI code will be seen as
eccentric as decompiling the Java class files and working directly with
the bytecode.
Until then, read
http://java.sun.com/docs/books/tutorial/uiswing/index.html
- Oliver