Reputation: 109
I am making a GUI for private purposes. The application first ask for login + pass, if correct the main window appear. It exists of a menubar, textarea, webview and some basic buttons. When one of those buttons is clicked the webbrowser should appear but all the others elements should still be visible. So after an eventhandler:
System.out.println("Stream");
StackPane root = new StackPane();
WebView VideoViewer = new WebView();
WebEngine engine = VideoViewer.getEngine();
engine.load("http://www.oracle.com/products/index.html");
root.getChildren().add(VideoViewer);
Scene scene = new Scene(root);
stage.setScene(scene);
stage.show();
System.out.println("Streaming...");
As you can see whole windows is filled with the html-page, my question is:
Thanks in advance!
Upvotes: 0
Views: 110
Reputation: 10989
Use a BorderPane
instead of the StackPane. A StackPane 'stacks' everything on top of each other. The BorderPane allows you to pick a side for each control element. If you have many elements for one side, put them in a VBox or HBox.
Upvotes: 1