When I try to execute setResizable for my scene in a javaFX application, it does not work. I can still resize the window. Here is the code for my test application:
setResizable
@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); }
Maybe I missed something very simple because I am very new to JavaFX. Can someone help me? I am using Eclipse 4.3 and JavaSDK 7u25 on Ubuntu 13.04 64bit
This works fine on Windows with JDK 1.7.0_25.
Perhaps your problem is that you are using your application on a Linux system (even if Ubuntu 13.04 is listed as a supported OS ...) Linux support recently, and some errors may persist.
stage.setMaxWidth(300); stage.setMaxHeight(200);
This prevents the selection of the window at the borders, but not from pressing the button of the full-screen window window, I did not understand how to do this.
This is not a bug. It depends on your operating system or window manager. Typically, you need to either set stage.setResizable(false); before or after stage.show() .
stage.setResizable(false);
stage.show()
Although the above solution works in most cases, sometimes you have to set the maximum height and width of your scene:
stage.setMaxWidth(400); stage.setMaxHeight(400);
Source: https://habr.com/ru/post/1493012/More articles:Prepared statements in mysqli do not work - mysqlUnable to register C ++ type for QML system - c ++Running Matlab from java ProcessBuilder, Matlab console does not appear on Mac OS 10.8 - javaAutomatically populate columns on one sheet from another sheet - excel-vbaGit push freezes when pressed via ssh - githttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1493013/using-mvvmcross-how-can-i-bind-a-list-of-annotations-to-a-mapview&usg=ALkJrhgFAQVOkEiBwrHKNl9Z9UzPONHRzQInvert col2rgb and rgb2hsv - colorsHow to make a controller function execute only once in AngularJS? - javascriptPandas access to last nonzero value - pythonLinux How to cut a column from one file and paste into another in a single line command? - linuxAll Articles