The best way to get from user two dimensional array in javaFX
问题 I need to get matrix from user. Which of the JavaFX features is the most useful? Grid with (m*n) textFields or TableView? The thing is, it is hard to represent TableView with variable number of columns. 回答1: I'd use a TextArea public class Matrix extends Application { @Override public void start(Stage primaryStage) { TextArea txt = new TextArea(); GridPane grid = new GridPane(); grid.setGridLinesVisible(true); txt.setOnKeyReleased(t-> { int i = 0; String[] rows = txt.getText().split("\n");