I use a ComboBox
to add an object to a TableView
and wanted it to be right after the user clicked on the desired object, this item was added in TableView
and exited the ComboBox
list.
I tried this way but gave NullPointerException
:
public void handleAddTeacherEvaluator(){
Teacher t = addTeachersBox.getSelectionModel().getSelectedItem();
auxTeachers.add(t); //adicionando na ObservableList da tableView
addTeachersBox.getItems().remove(t);
}