Modal and Modeless Frame


2004-12-04 03:38:24 PM
jbuilder2
Hi.
In a JBuilder project I designed two frames: the main frame (Frame1)
and a second frame (Frame2).
At the click of a button of the first frame I would like to show the
second frame (Frame2). To do this I wrote:
if (Framenew == null ) {
Framenew = new Frame2();
}
Framenew.setSize(400,300);
Framenew.setVisible(true);
It work, but the Frame2 is displayed in "modeless" way.
My questions are:
1.
How I can display Frame2 in "modal" way?
2.
Referring to the statement "Framenew.setSize(400,300);", there is a
way to find the size of the Frame2 as it was at design time? (I tried
to use "Frame2.getsize()" but I received a error saying me "non-static
method getSize() cannot be referenced from a static context"
3.
There is a better way to show Frame2 yet designed? (in modal or in
modeless way)
Thank you from Franco in Italy