2014-10-20 75 views
1

我測試了Java 8u40中的進度指示器。當我試圖做一個簡單的例子時,我得到了這個視覺效果。你知道我如何刪除矩形邊框嗎?從進度指示器中刪除矩形

enter image description here

+0

您是否嘗試過在CSS中設置'-fx-border-color'值? – 2014-10-20 13:38:58

+0

是的,它不工作。 – 2014-10-20 14:28:40

+0

我在8u45上遇到了同樣的問題,但是隻有在使用'Application.setUserAgentStylesheet(Application.STYLESHEET_CASPIAN)'時才能看到它。 – 2015-06-19 23:50:55

回答

0

應用CSS

-fx-box-border: transparent; 

的進度指示器。

+0

再次沒有結果。 – 2014-10-20 17:51:34

+1

您可以發佈將生成您顯示的屏幕截圖的代碼嗎? – 2014-10-20 17:52:51

1

這個工作對我來說,沒有邊界或其他問題(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(); 

這也許在8u40中的錯誤?

+1

是的,我的測試顯示邊界是在8u40中引入的。我仍然在8點45分看到它。 8u31,8u25和8u20沒有表現出這個問題。 – 2015-06-20 00:02:35