I am writing my JavaFX program and when I run my program i have a button that opens an application that is on my mac let's say it's safari. I want my GUI to run in fullscreen but every time I press the safari opener button my GUI gets "minimized". I want my safari to open on top of my GUI without "minimizing" my GUI. I tried setting my stage to be always on top like so "primaryStage.setAlwaysOnTop(true)" but it doesn't seem to work. This is my safari openner button.
ivSafari.setOnMousePressed(e -> { try { String cmd = "open /Applications/Safari.app"; Process p = Runtime.getRuntime().exec(cmd); } catch (IOException s) { s.printStackTrace(); } });
Thank You
1.4m articles
1.4m replys
5 comments
57.0k users