🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #3235

Re: Frames in frames

#3235
From: Paul Howes
Date: Sun, 22 Mar 1998 00:00
73 lines
2574 bytes
Have you tried sending an instance of the frame into its child.

new Frame2(this);

Class Frame2
{
  Frame2(Frame Parent)
  { .... }
}


If you do this you can control the parent frame by referencing it as Parent or
whatever you want to call it and using the normal setEnabled and setVisible
commands.


Stephan Jager wrote:

> 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



--

Paul Howes
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Paul.Howes@dial.pipex.com
Undergraduate
Computer Science\Software Engineering
University Of Birmingham (UK)
Technical Details
Message-ID: <351583C7.73BA1EC4@dial.pipex.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <3500234A.8B0A746E@sci.kun.nl> <3500A6B3.EB3D598B@corp.borland.com> <3505C4E6.AF907B0D@sci.kun.nl>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,813b005f16461963
X-Google-Attributes: gid1089d0,public
From: Paul Howes <Paul.Howes@dial.pipex.com>
Subject: Re: Frames in frames
Date: 1998/03/22
Message-ID: <351583C7.73BA1EC4@dial.pipex.com>
X-Deja-AN: 336622301
Content-Transfer-Encoding: 7bit
References: <3500234A.8B0A746E@sci.kun.nl> <3500A6B3.EB3D598B@corp.borland.com> <3505C4E6.AF907B0D@sci.kun.nl>
Mime-Version: 1.0
To: Stephan Jager <stephanj@sci.kun.nl>
Content-Type: text/plain; charset=us-ascii
Organization: University Of Birmingham
Newsgroups: borland.public.jbuilder.java.api