Solved

Frame interactions

Posted on 1997-04-02
1
199 Views
Last Modified: 2010-04-16
I have 2 frames. Frame 1 is a subclass of Frame. And Frame 2
is a subclass of Frame 1. From Frame 1 I call Frame 2 and hide Frame 1. Now I want to unhide Frame 1 by clicking a button in Frame 2. How would I go about doing this?
0
Comment
Question by:danzig040297
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 2

Accepted Solution

by:
majkl earned 20 total points
ID: 1219379
Bring Frame1 to Frame2 by reference.

Constructor for Frame2 Shoud look like this.

Frame1 frame1 ;

Frame2 (Frame1 f1 )
{
  this.frame1 = f1;
}

now you can call frame1.hide(); or frame1.show();


Create Frame2 in Frame1 like this :
Frame2 frame2;

frame2 = new Frame2(this);

here can you do frame2.hide(); ......

Hope This helps.
 
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question