0 Replies Latest reply: Feb 4, 2013 4:11 PM by 989076 RSS

    Fullscreen Multiple Screens Mac

    989076
      Is it possible to go fullscreen on multiple screens on mac?
      I can't get it to work.
      Then i tried a workaround with an UNDECORATED stage.
      but this gives this http://postimage.org/image/565ld2m1b/
      where the blue is the desktop.



      Code: -----

           private void setupStageFullScreen(Stage stage, int screenNumber) {
                ObservableList<Screen> screens = Screen.getScreens();
                Screen screen = screens.size() <= screenNumber ? Screen.getPrimary() : screens.get(screenNumber);

                Rectangle2D bounds = screen.getBounds();     

                stage.setX(bounds.getMinX()+1);
                stage.setY(bounds.getMinY()+1);
                stage.setWidth(bounds.getWidth());
                stage.setHeight(bounds.getHeight());

                if(screen.equals(Screen.getPrimary())) {
                     stage.setFullScreen(true);
                } else {
                     stage.toFront();
                }

           }