Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Switching between Frame A & B

 
Adrian Lee
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try JInternalFrame with JDesktopPane
 
Adrian Lee
Ranch Hand
Posts: 71
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic