Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/sorting/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javafx 2 如何自动调整边框窗格内容的大小?_Javafx 2 - Fatal编程技术网

Javafx 2 如何自动调整边框窗格内容的大小?

Javafx 2 如何自动调整边框窗格内容的大小?,javafx-2,Javafx 2,我有一个边界窗格和一个主播布局 当我试图将AnchorPane插入到BorderPane中,并最大化或最小化BorderPane时,AnchorPane不会根据其父BorderPane调整自身大小 我试着把AnchorPane放在BorderPane的中心,我让它可以自动调整大小。但它不起作用 parent.setCenter(anchorPane); anchorPane.autoresize(); 如何设置Ancorpane及其BorderPane父对象,以便通过调整父对象的大小,子对象可

我有一个边界窗格和一个主播布局

当我试图将AnchorPane插入到BorderPane中,并最大化或最小化BorderPane时,AnchorPane不会根据其父BorderPane调整自身大小

我试着把AnchorPane放在BorderPane的中心,我让它可以自动调整大小。但它不起作用

parent.setCenter(anchorPane);
anchorPane.autoresize();
如何设置Ancorpane及其BorderPane父对象,以便通过调整父对象的大小,子对象可以调整自身的大小?

检查此项:

BorderPane支持其应用程序的最小、首选和最大大小 儿童如果子对象的可调整大小范围阻止其调整大小 适应其位置

确保没有锚定窗格的最大大小