JavaFX 2.1 TableView refresh items

Since JavaFX 8u60 you can use(assuming tableView is an instance of TableView class): tableView.refresh(); From the documentation: Calling refresh() forces the TableView control to recreate and repopulate the cells necessary to populate the visual bounds of the control. In other words, this forces the TableView to update what it is showing to the user. This … Read more

Accessing FXML controller class

You can get the controller from the FXMLLoader FXMLLoader fxmlLoader = new FXMLLoader(); Pane p = fxmlLoader.load(getClass().getResource(“foo.fxml”).openStream()); FooController fooController = (FooController) fxmlLoader.getController(); store it in your main stage and provide getFooController() getter method. From other classes or stages, every time when you need to refresh the loaded “foo.fxml” page, ask it from its controller: getFooController().updatePage(strData); … Read more

Where has the JavaFX scene builder gone?

With JDK8u40, according to this: Starting with Oracle Java SE 8u40, Oracle does not provide a separate set of accompanying JavaFX Scene Builder binaries. If you would like to contribute changes, ideas or just let us know what you have done with the code, please consult the OpenJDK Community contribution guidelines and join the openjfx-dev … Read more

JavaFX – setVisible hides the element but doesn’t rearrange adjacent nodes

Node.setVisible(boolean) just toggles the visibility state of a Node. To exclude a Node from its parents layout calculations you additionally have to set its managed state, by calling Node.setManaged(false). If you want the managed state to be updated automatically alongside the visibility, you can use a binding as @jewelsea pointed out: node.managedProperty().bind(node.visibleProperty());

Passing Parameters JavaFX FXML

Using MVC Most of this answer focuses on a direct call to pass a parameter from a calling class to the controller. If instead, you want to decouple the caller and controller and use a more general architecture involving a model class with settable and listenable properties to achieve inter-controller communication, see the following basic … Read more