From c685511f030ed046a899469cc8b159c70d84cbea Mon Sep 17 00:00:00 2001 From: Niki Roo Date: Sat, 18 Apr 2020 17:37:24 +0200 Subject: [PATCH] Progress: new convenience constructor --- src/be/nikiroo/utils/ui/ProgressBar.java | 5 +++++ 1 file changed, 5 insertions(+) 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; -- 2.27.0