Remove rectangle from Progress Indicator

2019-06-03 22:45发布

I tested Progress Indicator in Java 8u40. I get this visual result when I tried to make simple example. Do you know how I can remove the rectangle borders?

enter image description here

2条回答
Summer. ? 凉城
2楼-- · 2019-06-03 23:20

Apply the CSS

-fx-box-border: transparent;

to the progress indicator.

查看更多
走好不送
3楼-- · 2019-06-03 23:27

this works for me with no border or other problems (JDK 1.8.0_20ea):

    stage.setWidth(100);
    stage.setHeight(100);

    BorderPane root = new BorderPane();

    ProgressIndicator progress = new ProgressIndicator();
    progress.setMaxWidth(50);
    progress.setMaxHeight(50);

    root.setCenter(progress);

    stage.setScene(new Scene(root));

    stage.show();

Is this maybe a bug in 8u40?

查看更多
登录 后发表回答