Index: javax/swing/SizeRequirements.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/SizeRequirements.java,v retrieving revision 1.10 diff -u -r1.10 SizeRequirements.java --- javax/swing/SizeRequirements.java 23 Jul 2005 19:47:14 -0000 1.10 +++ javax/swing/SizeRequirements.java 13 Sep 2005 10:21:39 -0000 @@ -116,7 +116,17 @@ */ public String toString() { - return null; // TODO + StringBuilder b = new StringBuilder(); + b.append("<["); + b.append(minimum); + b.append(','); + b.append(preferred); + b.append(','); + b.append(maximum); + b.append("]@"); + b.append(alignment); + b.append('>'); + return b.toString(); } /** @@ -271,7 +281,8 @@ SizeRequirements[] children, int[] offsets, int[] spans) { - calculateTiledPositions(allocated, total, children, offsets, spans, true); + calculateAlignedPositions(allocated, total, children, offsets, spans, + true); } /** @@ -306,7 +317,12 @@ int[] offset, int[] spans, boolean forward) { - // TODO + // TODO: Implement this correctly. + for (int i = 0; i < children.length; ++i) + { + // This is only a hack to make things work a little. + spans[i] = Math.min(allocated, children[i].maximum); + } } /**