0
如何设置Label
相对于GridPane
行高和列宽的高度和宽度?如何使用JavaFX和Scene Builder修复或设置GridPane行高和列宽的标签高度和宽度?
请检查我以下图片
我想要调整Label
相对于GridPane
行高和列宽。
通过代码我设置标签的背景颜色,如下所示。
if(cmnd1.WIM.equals("Y")){
javafx.application.Platform.runLater(new Runnable() {
@Override
public void run() {
lsduController1.oneWIM.setGraphic(new ImageView(new Image("/images/Wim_T.png")));
lsduController1.oneWIM.setStyle("-fx-background-color: none;");
}
});
} else {
javafx.application.Platform.runLater(new Runnable() {
@Override
public void run() {
lsduController1.oneWIM.setGraphic(new ImageView(new Image("/images/Wim_F.png")));
lsduController1.oneWIM.setStyle("-fx-background-color: Red;");
}
});
}
仍然现在我有@fabian – pen1993
同样的问题仍然现在我有同样的问题,我修改像“最大宽度:MAX_VALUE”和‘最大高度:MAX_VALUE’,并在预视图它表示细时我运行应用程序,所以图像将出现在那里,所以有图像的任何影响,请给我sujestion - @fabian – pen1993
给我建议以上评论 - @fabian – pen1993