为什么禁用舞台可调整大小不适用于javafx? [英] Why disabling of stage resizable dont work in javafx?

查看:261
本文介绍了为什么禁用舞台可调整大小不适用于javafx?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在javaFX应用程序中为我的场景尝试 setResizable 时,它不起作用。我仍然可以改变窗口大小。这是我的测试应用程序的代码:

When I try to setResizable for my scene in javaFX application it doesn't work. I still can change window size. Here's the code for my test application:

@Override
public void start(Stage stage) throws Exception {
    // TODO Auto-generated method stub

    stage.setTitle("Test window");
    stage.setWidth(300);
    stage.setHeight(200);
    stage.setResizable(false);

    stage.show();
}

public static void main(String[] args) {
    // TODO Auto-generated method stub
    Application.launch(args);

}

也许我错过了很简单的东西,因为我很新JavaFX的。谁能帮我?我在Ubuntu 13.04 64bit上使用Eclipse 4.3和JavaSDK 7u25

Perhaps I missed something very simple because I am very new to JavaFX. Can anyone help me? I am using Eclipse 4.3 and JavaSDK 7u25 on Ubuntu 13.04 64bit

推荐答案

这在使用JDK 1.7.0_25的Windows上运行正常。

This works fine on Windows with JDK 1.7.0_25.

也许你的问题来自于你在Linux系统上运行你的应用程序(即使Ubuntu 13.04列为支持的操作系统 ...)Linux支持是最新的,一些错误可能会持续存在。

Maybe your problem comes from the fact that you are running your application on a Linux system (even if Ubuntu 13.04 is listed as a supported OS...) The Linux support is recent and some bugs might persist.

这篇关于为什么禁用舞台可调整大小不适用于javafx?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆