1

The defaultCloseOperation() in my JFrame is set to DO_NOTHING_ON_CLOSE. The IDE shows that the program is still running and there is no way to get the JFrame back.

I want to know, how do I get the JFrame to be visible again if a certain key combination is pressed like SHIFT+V ? Like in some parental control and surveillance softwares

I know KeyListener can not be used cause it needs something focussable to which input can be sent... so what is the way around ??
Can it reappear when some keys are pressed ?

mKorbel
  • 109,525
  • 20
  • 134
  • 319
An SO User
  • 24,612
  • 35
  • 133
  • 221

2 Answers2

1

EDIT

Community
  • 1
  • 1
mKorbel
  • 109,525
  • 20
  • 134
  • 319
  • I was making a surveillance software so I need to have that facility. What other option apart from `SystemTray` do I have ? JNA ?? – An SO User Mar 23 '13 at 07:40
  • yes will be possible, but is about KeyLogger, then probably can be antivirus sensitive, SystemTray is proper and direct way – mKorbel Mar 23 '13 at 07:42
1

First of you make a windows adapter so that you can use the windowClosing method inside it. This method overrides the default EXIT_ON_CLOSE or in you case DO_NOTHING_ON_CLOSE and write what you want to happen when the program tries to exit on the red X. Hope it helps

Naranca
  • 73
  • 7