From: David ‘Bombe’ Roden Date: Sun, 26 May 2013 12:01:12 +0000 (+0200) Subject: Use a box instead of a panel. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=6c69559ae61380b298a6c2afa0b321ecee5a6bfb;p=sonitus.git Use a box instead of a panel. --- diff --git a/src/main/java/net/pterodactylus/sonitus/gui/ControlledPane.java b/src/main/java/net/pterodactylus/sonitus/gui/ControlledPane.java index cfc5f83..010fa3a 100644 --- a/src/main/java/net/pterodactylus/sonitus/gui/ControlledPane.java +++ b/src/main/java/net/pterodactylus/sonitus/gui/ControlledPane.java @@ -19,7 +19,6 @@ package net.pterodactylus.sonitus.gui; import javax.swing.Box; import javax.swing.BoxLayout; -import javax.swing.JPanel; import net.pterodactylus.sonitus.data.Controlled; import net.pterodactylus.sonitus.data.Controller; @@ -32,7 +31,7 @@ import net.pterodactylus.sonitus.data.controller.Switch; * * @author David ‘Bombe’ Roden */ -public class ControlledPane extends JPanel { +public class ControlledPane extends Box { /** * Creates a new controlled pane. @@ -41,7 +40,7 @@ public class ControlledPane extends JPanel { * The controlled whose controllers to display */ public ControlledPane(Controlled controlled) { - setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); + super(BoxLayout.Y_AXIS); for (Controller controller : controlled.controllers()) { if (controller instanceof Fader) { add(new FaderPanel((Fader) controller));