Make both methods use the same code to ensure equal convenience.

git-svn-id: https://samskivert.googlecode.com/svn/trunk@1608 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
mdb
2005-03-04 22:03:11 +00:00
parent f26c781b7b
commit 3e197bd2cd
@@ -356,7 +356,7 @@ public abstract class GroupLayout
*/ */
public static JPanel makeButtonBox (Justification justification) public static JPanel makeButtonBox (Justification justification)
{ {
return new JPanel(new HGroupLayout(NONE, justification)); return makeButtonBox(justification, null);
} }
/** /**
@@ -368,8 +368,10 @@ public abstract class GroupLayout
Justification justification, JComponent button) Justification justification, JComponent button)
{ {
JPanel box = new JPanel(new HGroupLayout(NONE, justification)); JPanel box = new JPanel(new HGroupLayout(NONE, justification));
box.add(button); if (button != null) {
box.setOpaque(false); box.add(button);
box.setOpaque(false);
}
return box; return box;
} }