-2

I have an application developed in JavaFX 8, running on Windows desktops. While this application is in execution, it should prevent user from switching to any other application or any other place at Windows OS. My application should be the only one the user could access.

I know this is possible to do, because I saw some applications with this functionality, but I don't know how to accomplish it on my application..

My application is running on many checkouts from a store, and the user should only use my checkout software while working.

Any suggestion where I should start is very welcome.

henriqueor
  • 849
  • 1
  • 17
  • 38
  • Set it full screen and use a tiny linux without anything but Java and your application on it. – Elliott Frisch Jul 29 '15 at 04:03
  • @Downvoter care to comment? – henriqueor Jul 29 '15 at 04:04
  • @ElliottFrisch My software is running on many checkouts from a store. There are others softwares that they need to use. I can't use linux for this. I need to use it on Windows. – henriqueor Jul 29 '15 at 04:06
  • I'm fairly certain you'll need native code. Also, you application **is only one the user could access** - so good luck. – Elliott Frisch Jul 29 '15 at 04:07
  • example of such applications? – Elltz Jul 29 '15 at 13:26
  • Microsoft provide a guides to [setup a kiosk](https://technet.microsoft.com/en-us/itpro/windows/manage/set-up-a-kiosk-for-windows-10-for-desktop-editions) or [lockdown windows to specific apps](https://technet.microsoft.com/en-us/itpro/windows/manage/lock-down-windows-10-to-specific-apps). I recommend you follow them. Additionally there are [tools and ways for disabling certain key combinations](http://stackoverflow.com/questions/4234242/disable-ctrl-alt-del-and-shutdown-for-kiosk) or [scan codes](https://www.trustedsec.com/april-2015/kioskpos-breakout-keys-in-windows/) if you must do that. – jewelsea Jul 01 '16 at 23:03

3 Answers3

0

Can you deploy your JavaFX application in a browser? Browser must be set to Kiosk mode with the only your JavaFX application accessible.

0

You can try this, idk if its even good, add Focusability to your Stage or overall Node (root) and when you detect that it is not Focused you call Stage.toFront() and give focus to it, you can track Focusability with bindings. or instead of calling toFront you can use Stage.setIconified(true) then Stage.setIconified(false) altogether will bring it to focus and ontop of everyone

check its implementation here

Community
  • 1
  • 1
Elltz
  • 10,730
  • 4
  • 31
  • 59
0

You can set your application to maximized:

stage.setMaximized(true);

Then set it to always be on top:

stage.setAlwaysOnTop(true);

Then add a listener to the stage's iconifiedProperty:

stage.iconifiedProperty().addListener(new ChangeListener<Boolean>() {
    @Override
    public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
        if(newValue)
            stage.setIconified(false);
    }
});