Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Java > Other Java > Java GUI
|
Java GUI Discussions specific to programming Java GUI.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Java GUI section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 18th, 2005, 05:27 PM
Authorized User
 
Join Date: Mar 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default Only one screen is displayed at one time

Hi there,

Due to my inadequacy, I need some help for one ~{!0~}simple problem~{!1~}.

(1) The GUI screens (frame/panel structure) are structured as ~{!0~}multiple levels (or generations)~{!1~} with only one level of the screen is displayed at one time. In other words, a first level (or parent) screen brings up a child (next level) screen based on the user selection/data-entry. The parent screen is either hidden or disposed (by its child), however the parent screen can be redisplayed with all the ~{!0~}entered~{!1~} data if user requested (from the child which has such a requirement). Sometimes a grand-child screen needs to dispose itself and its parent, and then brings back the grand-parent screen. It seems a simple task but me just unable to implement this option.

I must missing some key concept (or not understanding fully) of the Java features. Hope you don~{!/~}t mind that I ask for your help. Thanks in advance for all your time.


 
Old May 14th, 2005, 11:33 AM
Registered User
 
Join Date: May 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Well, lets say you are using JFrame and JDialog for such a task.
JFrame frame = new JFrame();
frame.setVisible(true) will bring up the JFrame object.
Another container object lke the JDialog we just talked about addede to it would be like this..
JDialog dialog = new JDialog(frame, "Title", true);
An actionEvent would bring up the dialog from the frame like this...
dialog.show()
and then.. to hide the parent container being the frame..
frame.setVisible(false);
another actionEvent to bring up the parent container and hide the child container being the dialog will go like this...
frame.setVisible(true);
dialog.dispose();
hope that helps you...






Similar Threads
Thread Thread Starter Forum Replies Last Post
Time displayed with date! Please help Renu ASP.NET 1.0 and 1.1 Basics 18 August 20th, 2004 09:04 AM
Time getting displayed along with Date mahulda Classic ASP Databases 15 August 16th, 2004 02:05 PM
Date and Time Displayed Together in DataGrid mahulda ADO.NET 2 July 16th, 2004 04:43 AM
Not getting "time" displayed in the first example dotnetabhi VS.NET 2002/2003 6 March 27th, 2004 11:53 AM
time displayed damnnono_86 Access 2 November 28th, 2003 01:02 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.