posted 16 years ago
Hi guys. I'm currently trying to troubleshoot my program fault. However, there is something that I'm unsure of. Hope you can spend afew minutes replying me.
My current program is about building a few GUI(with buttons) something like a media center, the program responds to keybinding actions(up, down, left, right, enter & escape).
As my program is rather long, I will try to explain briefly.
The program is something like this.
Program starts-> MainFrame(JFrame with a few buttons) appears.
When pressed enter on button0, MainFrame(JFrame) will be set invisible and New subframe0(JDialog with a few buttons) setvisible(true)
When pressed Escape, subframe0(JDialog) is setvisible(false), New MainFrame(JFrame) will be created and setvisible(true).
-Both frame and dialog is using keybinding
-------------------------------------------------------------------------
However, after running afew times as mentioned above(eg. navigating, open and closing). The GUI screen is still there, however it doesn't respond to my keybinding anymore.
Is there a guideline that I'll need to follow in order for the program not to be halted/hang?
Can I use keybinders for both JFrame and JDialog?
I would appreciate any suggestions or advice.
Thanks for taking time to read/helping out.
Best Regards,
Adrian Lee