package bugsfiling; import javafx.application.Application; import javafx.builders.StackPaneBuilder; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.control.TableColumn; import javafx.scene.control.TableView; import javafx.stage.Stage; /** * * @author Alexander Kouznetsov */ public class TableViewTest extends Application { public static void main(String[] args) { launch(args); } @Override public void start(Stage stage) throws Exception { TableView tableView = new TableView(); TableColumn tableColumn1 = new TableColumn("A"); tableColumn1.setPrefWidth(50); TableColumn tableColumn2 = new TableColumn("B"); tableColumn2.setPrefWidth(100); TableColumn tableColumn3 = new TableColumn("C"); tableColumn3.setPrefWidth(5); tableView.getColumns().addAll(tableColumn1, tableColumn2, tableColumn3); Parent root = new StackPaneBuilder() .children(tableView) .build(); Scene scene = new Scene(root, 300, 300); stage.setScene(scene); stage.setVisible(true); } }