【发布时间】:2017-04-25 17:53:59
【问题描述】:
所以我在弹出窗口中使用 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);
}
}
【问题讨论】: