This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes How Do I mininmise a Java Frame using the keyboard?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "How Do I mininmise a Java Frame using the keyboard??" Watch "How Do I mininmise a Java Frame using the keyboard??" New topic
Author

How Do I mininmise a Java Frame using the keyboard??

colette cronin
Greenhorn

Joined: Aug 13, 2001
Posts: 2
How do I minimise a Java Frame using the keyboard??
i.e. I want to be able to do "Alt space n" but I do not know
how to set a mnemonic to the JFrame
Regards
Colette
Luong Nguyen
Ranch Hand

Joined: May 06, 2001
Posts: 31
Hi,
You should overwrite processKeyEvent(KeyEvent) method where you catch the event that correspond to ALT SPACE then you use setVisible or setState method to minimise your frame.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How Do I mininmise a Java Frame using the keyboard??
 
It's not a secret anymore!