我在做一個javafx應用程序,它需要最大化,而且不能調整大小。 (我必須看到窗口下方的任務欄,但我已經修復了這個問題)。 但是,當我設置:JavaFx resizable
spelStage.setResizable(false);
Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds();
spelStage.setX(primaryScreenBounds.getMinX());
spelStage.setY(primaryScreenBounds.getMinY());
spelStage.setWidth(primaryScreenBounds.getWidth());
spelStage.setHeight(primaryScreenBounds.getHeight());
這也表明我想它(因爲setMaximize(真),任務欄消失)的方式。但是,當你在標題欄上拖動它仍然調整窗口小despites我說可調整大小錯誤...
有關如何使窗口不能調整大小的任何提示?
在此先感謝!
屏幕請,我不能清楚地想象會發生什麼,什麼是應該發生的。 –
是的當然,對不起..有了上面的代碼:http://imgur.com/jbsJjG4;使用setMaximize(true)(沒有Rectangle - > getheight)http://imgur.com/6DqGlGB,當我最大化時雙擊標題欄:http://imgur.com/FZRGaFU。我清理了窗戶的內容,因爲它與學校有關。謝謝。 – JC97