JDBC_ObservableList_Bind2
 
Code:

package javafxtemplate1;
//Central Controller Class
import java.sql.SQLException;
import java.io.IOException;
import javafx.scene.control.Label;
import javafx.scene.layout.VBox;
//
import javafx.application.Application;
import javafx.beans.binding.Bindings;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.geometry.Insets;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.TextField;
import javafx.scene.shape.Circle;
import javafx.stage.Stage;

public class JavaFXTemplate1 extends Application {

private final ExternalClass1B ext1 = new ExternalClass1B();
@Override
public void start(Stage primaryStage) throws IOException, SQLException {
ext1.loaddata();
ObservableList<Node> list = FXCollections.<Node>observableArrayList();
VBox root = new VBox();
root.setPadding(new Insets(100));
Bindings.bindContentBidirectional(list, root.getChildren());
list.add(new Button(ExternalClass1B.str1));
list.add(new TextField(ExternalClass1B.str2));
list.add(new Label(ExternalClass1B.str3));
primaryStage.setScene(new Scene(root, 300, 250));
primaryStage.setTitle("ObservableList JavaFx VBox");
primaryStage.show();
}

public static void main(String[] args) {
launch(args);
}
}

 

Displays: