I'm learning to develop in JavaFX. I would like to be able to select an item in a tableView, when you click a button, it opens a window with the details of the previously selected item. However I am facing the following error: The textField is null when I try to assign the value of the object field to the textField text.
controller.setCliente(cliente);
if (controller.getCliente() != null)
controller.fillForm();
There in the controller:
txtID.setText(cliente.getId().toString());
txtNome.setText(cliente.getNome());
// São vários campos
I've also tried to put in the initialize method, but to no avail. When I call the txtID, it is null.
Thanks for the help from your colleagues right away.