Java Reference
In-Depth Information
form...");
formPanel.getChildren().addAll(fxFormContent(),
swingNode);
pane.setCenter(formPanel);
VBox vbox = new VBox();
vbox.getChildren().addAll(fxbutton, fxLabel);
pane.setBottom(vbox);
Scene scene = new Scene(pane, 700, 500);
stage.setScene(scene);
stage.setTitle("Swing Form Embedded In JavaFX");
stage.show();
}
private void createSwingContent(final SwingNode
swingNode) {
SwingUtilities.invokeLater(() -> {
swingNode.setContent(new SwingForm());
});
}
private GridPane fxFormContent() {
grid = new GridPane();
grid.setAlignment(Pos.CENTER);
grid.setHgap(10);
grid.setVgap(10);
grid.setPadding(new Insets(25, 25, 25, 25));
Text scenetitle = new Text("Enter User");
scenetitle.setFont(Font.font("Tahoma",
FontWeight.NORMAL, 20));
grid.add(scenetitle, 0, 0, 2, 1);
Label first = new Label("First Name:");
grid.add(first, 0, 1);
Search WWH ::




Custom Search