This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell 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


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??