From: Niki Roo Date: Sat, 18 Apr 2020 15:00:13 +0000 (+0200) Subject: ProgressBar: add convenience constructor X-Git-Tag: fanfix-swing-0.0.1~27 X-Git-Url: https://git.nikiroo.be/?a=commitdiff_plain;h=95f1dafa58cb39065a57fc5f78d455c671aa1b21;p=fanfix-swing.git ProgressBar: add convenience constructor --- diff --git a/src/be/nikiroo/utils/ui/ProgressBar.java b/src/be/nikiroo/utils/ui/ProgressBar.java index 219cde9a..11e1e6c0 100644 --- a/src/be/nikiroo/utils/ui/ProgressBar.java +++ b/src/be/nikiroo/utils/ui/ProgressBar.java @@ -35,6 +35,11 @@ public class ProgressBar extends JPanel { actionListeners = new ArrayList(); updateListeners = new ArrayList(); } + + public ProgressBar(Progress pg) { + this(); + setProgress(pg); + } public void setProgress(final Progress pg) { this.pg = pg;