Are you using the latest JDK 8 Early-Access? If so, see this bug report I filed: http://javafx-jira.kenai.com/browse/RT-29018
Basically, in a recent release of the early-access build, they made some changes in the skins and css. This caused a hidden bug to be revealed in which child nodes which are dirtier than parent nodes but both need repainting in the same pulse, the parent's dirty level ends up overwriting the child nodes dirty level.
This causes the progress to not show, and in fact, for me the progressBar
became entirely invisible, as soon as updateProgress
was called from the task. They have a patch in place, I don't know when this will go through.
A work-around, either use jdk7 while waiting on the patch, or you can do what I did and apply this from the old css into your css stylesheet:
/*hack to get progress bar working. From: JDK7u17 jfxrt.jar!/com/sun/javafx/scene/control/skin/caspian/caspian.css */
/*******************************************************************************
* *
* ProgressBar *
* *
******************************************************************************/
.progress-bar {
-fx-skin: "com.sun.javafx.scene.control.skin.ProgressBarSkin";
-fx-background-color:
-fx-box-border,
linear-gradient(to bottom, derive(-fx-color,30%) 5%, derive(-fx-color,-17%));
-fx-background-insets: 0, 1;
-fx-indeterminate-bar-length: 60;
-fx-indeterminate-bar-escape: true;
-fx-indeterminate-bar-flip: true;
-fx-indeterminate-bar-animation-time: 2;
-fx-focus-traversable: true;
}
.progress-bar .bar {
-fx-background-color:
-fx-box-border,
linear-gradient(to bottom, derive(-fx-accent,95%), derive(-fx-accent,10%)),
linear-gradient(to bottom, derive(-fx-accent,38%), -fx-accent);
-fx-background-insets: 0, 1, 2;
-fx-padding: 0.416667em; /* 5 */
}
.progress-bar:indeterminate .bar {
-fx-background-color: linear-gradient(to left, transparent, -fx-accent);
}
.progress-bar .track {
-fx-background-color:
-fx-box-border,
linear-gradient(to bottom, derive(-fx-color,-15%), derive(-fx-color,2.2%) 20%, derive(-fx-color,60%));
-fx-background-insets: 0, 1;
}
.progress-bar:disabled {
-fx-opacity: 1.0
}