Remove rectangle from Progress Indicator

你说的曾经没有我的故事 提交于 2019-12-08 04:05:40

问题


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?


回答1:


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?




回答2:


Apply the CSS

-fx-box-border: transparent;

to the progress indicator.



来源:https://stackoverflow.com/questions/26462768/remove-rectangle-from-progress-indicator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!