if (weight < min || weight > max) {
throw new RuntimeException(String.format(
"Progress object %s cannot have a weight of %f, "
- + "it is outside of its parent (%s) range (%f)",
+ + "it is outside of its parent (%s) range (%d)",
progress.name, weight, name, max));
}
name, progress.parent.name));
}
+ progress.parent = this;
+
progress.addProgressListener(new ProgressListener() {
@Override
public void progress(Progress pg, String name) {