From 994af6e934b74ce2ac7fa1e7798f48d306b6e0c6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sun, 25 May 2008 12:37:52 +0200 Subject: [PATCH] revalidate status bar if side components changed --- src/net/pterodactylus/util/swing/StatusBar.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/net/pterodactylus/util/swing/StatusBar.java b/src/net/pterodactylus/util/swing/StatusBar.java index f4dc146..f37b9d7 100644 --- a/src/net/pterodactylus/util/swing/StatusBar.java +++ b/src/net/pterodactylus/util/swing/StatusBar.java @@ -81,6 +81,7 @@ public class StatusBar extends JPanel { sideComponents.add(component); int newIndex = sideComponents.size(); add(component, new GridBagConstraints(newIndex, 0, 1, 1, 0.0, 0.0, GridBagConstraints.LINE_START, GridBagConstraints.BOTH, new Insets(0, 2, 0, 0), 0, 0)); + validate(); } /** @@ -110,6 +111,7 @@ public class StatusBar extends JPanel { public void removeSideComponent(int sideComponentIndex) { Component sideComponent = sideComponents.remove(sideComponentIndex); remove(sideComponent); + validate(); } /** @@ -121,6 +123,7 @@ public class StatusBar extends JPanel { public void removeSideComponent(Component sideComponent) { sideComponents.remove(sideComponent); remove(sideComponent); + validate(); } } -- 2.7.4