我有一个关于在Windows 8.1上使用触摸支持的电脑上使用虚拟键盘的问题.当使用java开关关注textfield时,我已设法显示虚拟键盘:
-Dcom.sun.javafx.isEmbedded=true -Dcom.sun.javafx.virtualKeyboard=javafx
Run Code Online (Sandbox Code Playgroud)
我发现在JavaFX虚拟键盘上如何显示1.
但是当键盘显示出来时,它会重叠键盘下方的节点.
根据我读到的,http://docs.oracle.com/javase/8/javafx/user-interface-tutorial/embed.htm,它不应该像那样工作.
有没有人有这种问题的经验?
当我运行测试应用程序时,它会全屏显示并显示嵌入式虚拟键盘,因为文本字段具有焦点.在我"隐藏"键盘之前,这种情况下的文本字段是不可见的.我不确定这是正确的方法,所以我需要帮助.
java -Dcom.sun.javafx.isEmbedded=true -Dcom.sun.javafx.virtualKeyboard=javafx application.TestVKB
public class TestVKB extends Application{
public static void main(String[] args) {
Application.launch(args);
}
@Override
public void start(Stage stage) throws Exception {
TextField tfComment = new TextField();
tfComment.setPromptText("Enter comment");
BorderPane borderPane = new BorderPane();
borderPane.setBottom(tfComment);
Scene scene = new Scene(borderPane);
stage.setScene(scene);
stage.setMaximized(true);
stage.show();
}
}
Run Code Online (Sandbox Code Playgroud)

单击字段用户名或密码后

我会很感激任何建议.提前致谢.