diff --git a/projects/samskivert/src/java/com/samskivert/swing/GroupLayout.java b/projects/samskivert/src/java/com/samskivert/swing/GroupLayout.java index 016137a7..0f3abb81 100644 --- a/projects/samskivert/src/java/com/samskivert/swing/GroupLayout.java +++ b/projects/samskivert/src/java/com/samskivert/swing/GroupLayout.java @@ -1,5 +1,5 @@ // -// $Id: GroupLayout.java,v 1.5 2002/05/16 02:02:38 mdb Exp $ +// $Id: GroupLayout.java,v 1.6 2002/09/25 07:26:19 mdb Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -324,6 +324,16 @@ public abstract class GroupLayout return new JPanel(new HGroupLayout()); } + /** + * Creates a {@link JPanel} that is configured with an {@link + * HGroupLayout} with a configuration that stretches in both + * directions, with the specified gap. + */ + public static JPanel makeHStretchBox (int gap) + { + return new JPanel(new HGroupLayout(STRETCH, STRETCH, gap, CENTER)); + } + /** * Creates a {@link JPanel} that is configured with an {@link * HGroupLayout} with the specified on-axis policy (default @@ -397,6 +407,16 @@ public abstract class GroupLayout DEFAULT_GAP, justification)); } + /** + * Creates a {@link JPanel} that is configured with an {@link + * VGroupLayout} with a configuration that stretches in both + * directions, with the specified gap. + */ + public static JPanel makeVStretchBox (int gap) + { + return new JPanel(new VGroupLayout(STRETCH, STRETCH, gap, CENTER)); + } + protected int _policy = NONE; protected int _offpolicy = CONSTRAIN; protected int _gap = DEFAULT_GAP;