0
所以我使用jfoenix JFXPopup組件作爲彈出窗口。終於得到彈出窗口顯示。我意識到彈出窗口是相對於您通過它的所有者節點顯示的。我的問題是有什麼方法可以顯示相對於場景的彈出窗口,所以我可以將其居中?如何居中彈出?
不幸的是,您不能將彈出窗口居中在所有者節點上,只能將其向上或向左或向右移動?現場
Popup relative to the search textfield in the middle of the application
//Current Code
@FXML
protected void handleLoginButton(ActionEvent event) {
System.out.println("Popup BUtton clicked");
if (!loginPopup.isShowing()) {
System.out.println("Popup is open!");
//loginPopup.show(searchBtn, JFXPopup.PopupVPosition.BOTTOM, JFXPopup.PopupHPosition.LEFT);
loginPopup.show(searchBtn);
}
}