| View previous topic :: View next topic |
| Author |
Message |
Erik Spencer Williams Guest
|
Posted: Tue Sep 21, 2004 1:48 am Post subject: Switching from Source to Design Spawns Frame |
|
|
Hello All,
Quick question: when I switch between [Source] and [Design] tabs the IDE
pops up the parent JFrame from my project.
I've been through the settings and can't find a way to turn this off. Each
time I switch between the two tabs another JFrame is spawned over the IDE.
Any ideas on why this function exists and how I turn it off?
Thanks!
Erik Spencer Williams
|
|
| Back to top |
|
 |
Gillmer J. Derge [TeamB] Guest
|
Posted: Tue Sep 21, 2004 2:27 am Post subject: Re: Switching from Source to Design Spawns Frame |
|
|
Erik Spencer Williams wrote:
| Quote: | Quick question: when I switch between [Source] and [Design] tabs the IDE
pops up the parent JFrame from my project.
I've been through the settings and can't find a way to turn this off. Each
time I switch between the two tabs another JFrame is spawned over the IDE.
Any ideas on why this function exists and how I turn it off?
|
The designer uses live or semi-live instances of your classes in order
to make them display correctly in the IDE. Does your class have
something in it that would open a window? For example, if your
constructor calls the show() method, that would do it.
One way to avoid this would be to wrap the show call in an if block that
only executes at runtime. For example,
public MyFrame() {
if (!Beans.isDesignTime()) {
show();
}
}
--
Gillmer J. Derge [TeamB]
|
|
| Back to top |
|
 |
Erik Spencer Williams Guest
|
Posted: Tue Sep 21, 2004 3:25 am Post subject: Re: Switching from Source to Design Spawns Frame |
|
|
Perfect, that's exactly what was up. Thanks for your help!
"Gillmer J. Derge [TeamB]" <spam (AT) gillmerderge (DOT) com> wrote
| Quote: | Erik Spencer Williams wrote:
Quick question: when I switch between [Source] and [Design] tabs the IDE
pops up the parent JFrame from my project.
I've been through the settings and can't find a way to turn this off.
Each time I switch between the two tabs another JFrame is spawned over
the IDE.
Any ideas on why this function exists and how I turn it off?
The designer uses live or semi-live instances of your classes in order to
make them display correctly in the IDE. Does your class have something in
it that would open a window? For example, if your constructor calls the
show() method, that would do it.
One way to avoid this would be to wrap the show call in an if block that
only executes at runtime. For example,
public MyFrame() {
if (!Beans.isDesignTime()) {
show();
}
}
--
Gillmer J. Derge [TeamB]
|
|
|
| Back to top |
|
 |
|