Java Reference
In-Depth Information
// Form on the right
GridPane rightGridPane = new MyForm();
GridPane leftGridPane = new
GridPaneControlPanel(rightGridPane);
VBox leftArea = new VBox(10);
leftArea.getChildren().add(leftGridPane);
HBox hbox = new HBox();
hbox.getChildren().add(splitPane);
root.getChildren().add(hbox);
splitPane.getItems().addAll(leftArea,
rightGridPane);
primaryStage.setScene(scene);
primaryStage.show();
}
}
When the form designer application is launched, the target form to be manipulated
is shown on the right side of the window's split pane. The following code is a simple
grid-like form class that extends from GridPane. It will be manipulated by the form
designer application:
/**
* MyForm is a form to be manipulated by the user.
* @author cdea
*/
public class MyForm extends GridPane{
public MyForm() {
setPadding(new Insets(5));
setHgap(5);
setVgap(5);
Label fNameLbl = new Label("First Name");
Search WWH ::




Custom Search