netbeans - Display two windows at the same time "on fullscreen" with JavaFx Scene Builder 2.0 -


I am working on a small application where I have to show the user twice at the same time but on fullscreen (The app will be made for users on dual screens.)

I am working with JavaFox View Builder 2.0 on Netbusiness 8.0.1

I tried to do this but Only full screen display on the second window.

  Public Zero Show Docerian () {{Root = FXML Loader. Load (getClass (). GetResource ("ClientsOperationsWindow.fxml")); Visual View = New View (Route); GlobalStage.setScene (view); GlobalStage.setFullScreen (true); GlobalStage.setResizable (true); GlobalStage.show (); Phase One and Phase = New Phase (); Parents secondRoot = FXMLLoader.load (getClass (.) GetResource ("ClientsSearchWindow.fxml")); Visual secondarystage = new view (second root); SecondStage.setScene (anotherScene); SecondStage.setFullScreen (true); SecondStage.show (); } Hold (exception pre) {System.out.println (ex.getMessage ()); }}  

Is it possible to display two windows on fullscreen?

Thank you!

I think you do not set two steps in two monitors at the same time You can get the same result, but you can force the stage dimension.

For this, we will use the javafx.stage.Screen so that we can get the attributes for different monitors connected to each. Then we load the FxL files in each view, and display each stage on our platform with the screen.getbold () now we send the origin and dimension of the rectangle to the primary screen. Therefore, we set boundaries of these rectangles with the boundaries of each rectangle. After all, we have set the style unconditionally. The only feature is still missing which is out of a "fullscreen" mode key combination

  Personal screen secondary screen; @ Override throws public IOException (Stage Primary Stage) IOException {screen primaries = screen.getprimary (); Original root = FXMLLoader.load (getClass (). GetResource ("Screen1.fxml")); Visual View = New View (Route); PrimaryStage.setScene (view); Rectangle 2D border = primaryscreen Bats (); PrimaryStage.setX (bounds.getMinX ()); PrimaryStage.setY (bounds.getMinY ()); PrimaryStage.setWidth (bounds.getWidth ()); PrimaryStage.setHeight (bounds.getHeight ()); PrimaryStage.initStyle (StageStyle.UNDECORATED); PrimaryStage.show (); // Look for a second screen screen. GetScreens () Stream () .Filter (s->; s.equals (primary screen)) .findFirst () IfPresent (s-> secondary screen = s); If (secondary screen! = Zero) {Stage secondary stage = new phase (); Generator root2 = FXML loader. Load (getClass (). GetResource ("Screen2.fxml")); Scene view 2 = new view (root 2); SecondaryStage.setScene (scene2); Rectangle 2D bound 2 = Secondary screen. Gatebound (); SecondaryStage.setX (bounds2.getMinX ()); SecondaryStage.setY (bounds2.getMinY ()); SecondaryStage.setWidth (bounds2.getWidth ()); SecondaryStage.setHeight (bounds2.getHeight ()); SecondaryStage.initStyle (StageStyle.UNDECORATED); SecondaryStage.show (); }}  

Comments

Popular posts from this blog

winforms - C# Form - Property Change -

javascript - amcharts makechart not working -

java - Algorithm negotiation fail SSH in Jenkins -