borderPane中的透明/无背景色

时间:2016-04-26 13:43:31

标签: java css javafx javafx-8 borderpane

我正在尝试构建自己的加载对话框。我有一个。* png代表加载指标。此图像将在包含在边框中的imageview中设置。我的问题是边框背景拒绝透明。我尝试了几个选项,但没有像我想要的那样有效。我试图直接在FXML中设置背景,但也在Javacode和CSS中设置背景。什么都行不通。

当我更新到Java 1.8_77 frin 1.8_66时出现此问题。我搜索了它,但没有找到任何关于此的内容。

有谁知道为什么这不起作用?

我尝试过:

CSS

-fx-background-color: transparent;
-fx-background-color: none;
-fx-background-color: transparent !important;
-fx-background-color: rgba

爪哇

borderPane.setBackground(Background.EMPTY);
borderPane.getScene().setFill(Color.TRANSPARENT);
borderPane.getScene().getRoot().setStyle("-fx-background-color: transparent !important;");

FXML 与CSS相同

0 个答案:

没有答案
相关问题