So i have a Person class:
package tableview;
import javafx.beans.property.SimpleBooleanProperty;
import javafx.beans.property.SimpleStringProperty;
public class Person {
private SimpleStringProperty name;
private SimpleBooleanProperty smart;
public Person(String name, boolean smart) {
this.name = new SimpleStringProperty(name);
this.smart = new SimpleBooleanProperty(smart);
}
public SimpleStringProperty getName() {
return name;
}
public void setName(SimpleStringProperty name) {
this.name = name;
}
public SimpleBooleanProperty getSmart() {
return smart;
}
}
and this is how i add them to the ObservableList of Persons
person.add(new Person("Emre", false));
and this is how i set the CellValueFactory
nameColumn.setCellValueFactory(new PropertyValueFactory<Person, String>("name"));
and these are the columns
@FXML
public TableColumn<Person, String> nameColumn;
@FXML
public TableColumn<Person, Boolean> smartColumn;
But it shows this on the table view
is there anyway to show the string for the name?