javafx - 使用 com.gluonhq.charm.glisten.control.Dialog 遇到问题
问题描述
我需要用户在我的 gluon 应用程序中输入文本。所以我使用com.gluonhq.charm.glisten.control.Dialog<T>
如下所示的。
Dialog<String> dialog = new Dialog();
dialog.setResult("");
com.gluonhq.charm.glisten.control.TextField textField = new com.gluonhq.charm.glisten.control.TextField("");
textField.textProperty().addListener(new ChangeListener(){
@Override
public void changed(ObservableValue observable, Object oldValue, Object newValue) {
dialog.setResult((String) newValue);
}
});
dialog.setContent(textField);
Button ok = new Button("OK");
ok.setOnAction(ev -> {
dialog.hide();
});
dialog.getButtons().add(ok);
String name = dialog.showAndWait().get();
当按下确定按钮或当我按下对话框外的某个位置时,应用程序会冻结。正如预期的那样,它可以在桌面上运行。我该如何在手机上解决这个问题?
问题似乎是因为它是从按钮侧显示的SidePopupView
解决方案
推荐阅读
- sql - 如何使用 clr/c++ 从数据库中获取 int 并将其转换为 system::int
- r - 旋转数据框列表并合并它们
- powershell - PowerShell 查找当前运行主机的路径(PowerShell 可执行文件)
- javascript - JSON javascript 日期时间格式
- wordpress - IIS 中的 Wordpress 域名
- java - Parsing Json - 运行代码时显示不同的顺序
- excel - 分隔列以获取日期和时间等详细信息
- python - 如何将pascal dll连接到python?
- haskell - 如何在 Servant 中使用 Generalized Auth 访问 reader monad
- excel - Excel VBA宏在最后一行到下一个空白行之后自动填充(即填充)?