Answer the question
In order to leave comments, you need to log in
JavaFX: How to open a detailed view window when clicking on a row in a table?
When you click on a row in the table, you need to show a window filled with the model that I have chosen.
I catch the event, here is the handler
/**
* Событие выбора строки
* Срабатывает когда пользователь выбирает строку в таблице продуктов.
*
* @param item - выбранная модел продукта
*/
private void selectRowAction(Order item) {
this.updateTable();
AnchorPane orderFormView = OrderFormController.getView();
BreadCrumbs.setView(orderFormView);
}
/**
* Геттер представления карточки товара
* @return
*/
public static final AnchorPane getView() {
try {
FXMLLoader loader = new FXMLLoader();
loader.setLocation(Object.class.getResource("/views/OrderForm.fxml"));
return loader.load();
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question