Article View: borland.public.jbuilder.java.api
Article #3214Re: Frames in frames
From: Stephan Jager
Date: Tue, 10 Mar 1998 00:00
Date: Tue, 10 Mar 1998 00:00
45 lines
1921 bytes
1921 bytes
Joe Nuxoll wrote:
> Stephan Jager wrote:
> > I don't know if this is a stupid question, but my problem is, I need to
> > open a new frame in a frame, and the parent frame shouldn't be editable
> > or visible anymore. After the childs frame has been closed (with
> > dispose() ?) , the control should return to the parents frame.
> > With dialogs you simply do dialog.setModal(true), but this doesn't work
> > with frames. Does anybody have a solution ?
>
> Try something like this:
>
> otherFrame.addWindowListener(new WindowAdapter() {
> public void windowClosing(WindowEvent e) {
> this.setVisible(true);
> }
> });
> this.setVisible(false);
> otherFrame.setVisible(true);
>
I tried to use this, but it doesn't work quite while yet.
I have another frame, called Frame2
I create it with
Frame2 frame = new Frame2();
for example, I have a butten, which is controlled to a button-action thing.
void Button1_actionPerformed(ActionEvent e) {
// here I want to open frame2, and freeze/close this.frame and when frame2
closes, open, activatet his.frame again
}
I tried to play/work around with the thigns you said, but I couldn't get it
to work yet. Any idea? and do I have to use the project thing for the frame,
and add an WindowClosing Event to it? (to the current frame ?)
Stephan
> - Joe Nuxoll
Technical Details
Message-ID:
<3505C4E6.AF907B0D@sci.kun.nl>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3500234A.8B0A746E@sci.kun.nl> <3500A6B3.EB3D598B@corp.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1089d0,813b005f16461963 X-Google-Attributes: gid1089d0,public From: Stephan Jager <stephanj@sci.kun.nl> Subject: Re: Frames in frames Date: 1998/03/10 Message-ID: <3505C4E6.AF907B0D@sci.kun.nl> X-Deja-AN: 332770948 Content-Transfer-Encoding: 7bit References: <3500234A.8B0A746E@sci.kun.nl> <3500A6B3.EB3D598B@corp.borland.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Organization: University of Nijmegen, The Netherlands Newsgroups: borland.public.jbuilder.java.api