1

I want to add row data in JFXTreeTableview by JFXTextFiled (JFXTreeTableview is not equals to TreeTableview, the method between them is different). But I don't know how to do. Here's my code. ("Record" class includes two attribute: "Input" & "Result")

public JFXTextField textField;

public JFXTreeTableView<Record> treeTableView;
private JFXTreeTableColumn inputColumn = new JFXTreeTableColumn("Input");
private JFXTreeTableColumn resultColumn = new JFXTreeTableColumn("Result");

public void initialize(){
    inputColumn.setCellValueFactory(new PropertyValueFactory<>("input"));
    resultColumn.setCellValueFactory(new PropertyValueFactory<>("result"));

    treeTableView.getColumns().setAll(inputColumn,resultColumn);
}

public void doSomething(){
    String input = textField.getText();
    String result = input.reverse();

    Record r = new Record(input,result);

    //add row from "Record"
}
Cheng Benny
  • 11
  • 1
  • 4
  • The method between **JFXTreeTableView** and **TreeTableView** is different. This is why I emphasized JFoenix in title. – Cheng Benny Jan 17 '19 at 03:17

0 Answers0