🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: aus.computers.java
Article #1126

Re: newbie ? about multiple frames

#1126
From: minirich
Date: Sat, 15 May 1999 00:00
44 lines
2240 bytes
 a actionlistener will start this sequence

          gamefr = new JFrame("BlackJack"); // new frame you want
          bj = new BlackJack(this); //object for new frame
          gamefr.addWindowListener(new WL()); //add the windowlistener to
fram
          gamefr.getContentPane().add(bj,BorderLayout.CENTER); // add
Objecet in center to new contentpane
          gamefr.setSize(600,250); //set framesize
           bj.init(); //start init of object
          bj.start(); //run run of object
          visible(gamefr,true); //set visibility of new frame true see below
   visible(editfr,false);//set visibility of old frame false see below

public void visible(Frame frame,boolean vis)  //Method for visibility
 { //frame ist the frame u want to set, vis is the state u want to set
        frame.setVisible(vis);  //original commant frame comes from above
vis comes from above
 }


Steve Heron schrieb in Nachricht <7hgmom$k6v$1@dove.qut.edu.au>...
>Hi Java ppl,
>
>hope someone can straighten me out - i'mm writing an app for an assignment.
>
>First class creates a frame (no problem), which closes normally using
>WindowAdapter/WindowClosing/ System.exit(0)
>
>This frame calls a second frame, which for the life of me I cant get to
>close
>and return to the first frame.  I know the solution is bound to be simple,
>slap my head in disbelief sort of stuff, but I've searched the API high and
>low, looked up books (online and off), but all i can find is single frame
>application examples.
>
>Can someone please put me out of my misery.
>
>TIA
>Steve
>
>
>
>
Technical Details
Message-ID: <Iwg%2.66101$_k1.52200@news.chello.at>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7hgmom$k6v$1@dove.qut.edu.au>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10d6db,323f5fa59a523484
X-Google-Attributes: gid10d6db,public
From: "minirich" <answer0@u4me.com>
Subject: Re: newbie ? about multiple frames
Date: 1999/05/15
Message-ID: <Iwg%2.66101$_k1.52200@news.chello.at>
X-Deja-AN: 478193619
References: <7hgmom$k6v$1@dove.qut.edu.au>
X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3
X-Complaints-To: news@telekabel.at
X-Trace: news.chello.at 926782632 212.17.73.249 (Sat, 15 May 1999 17:37:12 MET DST)
Organization: Chello Austria
NNTP-Posting-Date: Sat, 15 May 1999 17:37:12 MET DST
Newsgroups: aus.computers.java