From: David ‘Bombe’ Roden Date: Sun, 25 May 2008 10:37:52 +0000 (+0200) Subject: revalidate status bar if side components changed X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=994af6e934b74ce2ac7fa1e7798f48d306b6e0c6;p=jSite2.git revalidate status bar if side components changed --- 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(); } }