is there a way to remove the windows key effect on the local machine, so that my program doesn't minimize? I have tried an empty if statement, but that didn't do anything.

Thanks for any help.

Recommended Answers

All 6 Replies

I suspect there is no way in pure Java to prevent it, but you could have a WindowStateListener and immediately restore it to normal when it's minimized.
On the other hand if you are choosing to ignore the user's decision to minimize your window, then you should have a very good reason.

Thanks, and it is so my 15 month old cousin can't change anything on the computer. I have a way of closing the program though.

why bothering with that not simple job use JDialog instead, don't have a minimize maximize button.

OK, I understand that problem only too well :-(

Member Avatar for hfx642

So... Your 15 MONTH old cousin uses your computer WITHOUT your permission???

This sounds like something you could easily solve by putting a short password on your user account and locking the computer (by using the Start menu or Windows Key + L) when you're not around.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.