Prohibit access to the windows desktop

I need ideas on how to make a Java application running in a Windows environment to always be the active application, and also stay on top of other windows... i.e. the users should not be able to access the desktop behind, or switch to any other applications...

One person told me to have a look at an application called "GiveWinFocus.exe", but I'd like to hear more ideas on how this can be achieved, and what solution might be the best...

LVL 12
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

This can be achieved natively in java without external apps. Add a focus listener to your JFrame - when focus is lost, give it focus again, which effectivly keeps it on top at all times since it can never lose focus.
Mick BarryJava DeveloperCommented:
HypoAuthor Commented:
It's important that the user should not be able press ALT + TAB to switch application, or in any other way get access to the desktop and file system (CTRL+ALT+DELETE); and I guess running it in full screen mode would still allow the user to still switch application using ALT+TAB...

I've heard about the focus solution before, and that might be a way forward...  however I would still like to hear if there are any other ideas...

perhaps I should extend this question to the Windows-area as well; If there might be a way to configure the OS for a specific windows user, so that the desktop can not be accessed. (The users that are intended to use this application will belong to specific windows user groups).
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

You can only do what you want to do (i.e. prevent any subversion by the user) by running the OS in what's known as 'kiosk mode'. That would probably be a specialized version of Windows.
You could run the app using a OSS ramdisk OS running in kiosk mode

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
HypoAuthor Commented:
Kiosk mode seems like what I'm looking for... I'll look into it...


If you organise things carefully, and your use case is appropriate, you can put together a live kiosk OS on disk (say usb key) that has just your app and the bare minimum of anything else
HypoAuthor Commented:
That seems nice... :)
however, I'm working on quite a large project with lots of requirements and other developers involved, so I can't really take the freedom to change anything big... just have to stick to the requirements and do my parts as best I can... like any good code monkey would :D

thanks for the tip though...
Mick BarryJava DeveloperCommented:
I already showed you how to run it in kiosk mode :)
blocking access to the desktop is nothing to do with your application and can be implemented independently depending on the OS

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.