File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Switching between Frame A & B Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Switching between Frame A & B" Watch "Switching between Frame A & B" New topic
Author

Switching between Frame A & B

Adrian Lee
Ranch Hand

Joined: May 10, 2007
Posts: 71
Hi everyone. I would like to know which/what is the best way of switching between 2 frames, without causing the program to be halt.

I'm trying to switch between this 2 frames which both has differnt keybindings.
Frame A > Frame B > Frame A

I've tried using setVisible and dispose. Attached below are some codes that I'm using.

Frame A


Frame B


Please advice. Thanks in advance.
[ June 20, 2007: Message edited by: Adrian Lee ]
yacine fandi
Greenhorn

Joined: Apr 10, 2004
Posts: 1
try JInternalFrame with JDesktopPane


peace love and empathy
Adrian Lee
Ranch Hand

Joined: May 10, 2007
Posts: 71
Thanks for the reply, yacine.

I've tried running and editing some examples from the internet.
Somehow, I'm not really sure if JInternalFrame with JDesktopPane could follow my project requirements.

My project requires the frames to be undecorated and the buttons within the frames to accept keybindings without the use of the mouse. User can press the cursor keys to navigate around the buttons within the frame and switch from frame A to frame B and vice versa.

Keys that I'm using is Escape, Up, Down, Left, Right.

Please advice.
Thanks in advance.
[ June 20, 2007: Message edited by: Adrian Lee ]
 
 
subject: Switching between Frame A & B
 
Similar Threads
Probelm with JFrame Minimization.
Modify a frame from an inner class
Error Message
JDialog question
closing a current jframe