This week's book giveaway is in the Agile and other Processes forum. We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line! See this thread for details.
when i press "logout" in A screen i will get B screen as a new pop up screen.
the problem is when we have to press "cancle" button in B screen it has to come to same A screen .
that means i have to destroy that B screen object completely... and come to screen A..
The main Requirement is to come back to the old A Screen and i should have full fuctionality normal in Screen A and screen B should dissapear... completely.....
If "screen B" is simply a confirmation screen ("are you sure you want to log out"), I'd use a modal dialog to prompt the user without leaving "screen A". If "screen B" is a fully-featured screen, I'd use Card Layout to flip between the screens without destroying them.
the thing is the screen B look like "it has as User text box and Password text box ,OK button ,CANCEL button & EXIT button so
The process is when he click to logout from Screen A then he goes to Screen B. and If he thinks to go Back to Screen A then he clicks CANCEL so this time This Screen should destroy and i have to go back to Screen A
so really dont which lay out we are using please help me out.. bye
Ricky Clarkson
Ranch Hand
Joined: Jul 27, 2006
Posts: 131
posted
0
Java doesn't have screens. You need to be more specific about what you're doing. Including a runnable example might help.
yes we did the code what you said but what happened the particular screen got invinsible . but the control on the other screen never reached that is .
we can see the screen A but we can do any operation on it but as you said screen B is invisible
is there any method or thing where i can get control over it after invisibility..
sudhakar ananth
Ranch Hand
Joined: Feb 02, 2007
Posts: 68
posted
0
yes we did the same to the code as you said but what happened the particular screen got invinsible , but the control on the other screen never reached, that is we can see the screen A but we cannot do any operation on it but as you said screen B is invisible
is there any method or thing where i can get control over it after invisibility..
Tapan Maru
Ranch Hand
Joined: May 08, 2006
Posts: 65
posted
0
Can you please explain again? I am not getting exactly
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
posted
0
I'm a bit lost with the description too, but this may handle your problem
add an actionListener to frameA's logoutButton, and in actionPerformed(..) [frameA].setVisible(false): new FrameB([frameA]);//include code for visibility of FrameB, if required
now, in the code for FrameB: 1) include a reference parameter (to frameA) in the constructor 2) add a windowListener, and in windowClosing(..) frameA.setVisible(true);
sudhakar ananth
Ranch Hand
Joined: Feb 02, 2007
Posts: 68
posted
0
Mr michael i got the solution using JDialog as you said in my other question and thank you very much ...