Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/351.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
Java VBox设置特定于元素的填充宽度true_Java_Javafx_Javafx 8 - Fatal编程技术网

Java VBox设置特定于元素的填充宽度true

Java VBox设置特定于元素的填充宽度true,java,javafx,javafx-8,Java,Javafx,Javafx 8,有没有办法将fillWidth设置为VBox的特定子级的true 当前输出: 如果VBox fillWidth=false设置 如果VBox fillWidth=true,则设置 预期输出: 属性本身将应用于所有子级 但是,您可以使用HBox1。setPrefWidth(Double.MAX_值)和HBox1将填充宽度。 (因为看起来您正在使用场景生成器,所以也可以使用足够大的值。) 另一种方法也是可行的:将fillWidth设置为true,并使用maxWidth属性限制其他HBox元素的宽

有没有办法将fillWidth设置为VBox的特定子级的true

当前输出:

如果VBox fillWidth=false设置

如果VBox fillWidth=true,则设置

预期输出:


属性本身将应用于所有子级

但是,您可以使用
HBox1。setPrefWidth(Double.MAX_值)
HBox1
将填充宽度。 (因为看起来您正在使用场景生成器,所以也可以使用足够大的值。)

另一种方法也是可行的:将
fillWidth
设置为true,并使用
maxWidth
属性限制其他
HBox
元素的宽度