Commit 2fb4e07f by Tom Tromey Committed by Tom Tromey

FlowLayout.java (layoutContainer): Correctly compute loop termination condition.

	* java/awt/FlowLayout.java (layoutContainer): Correctly compute
	loop termination condition.
	* java/awt/GridLayout.java (getSize): Use `real_cols' to compute
	width.

From-SVN: r49216
parent fd29f6ea
2002-01-25 Tom Tromey <tromey@redhat.com>
* java/awt/FlowLayout.java (layoutContainer): Correctly compute
loop termination condition.
* java/awt/GridLayout.java (getSize): Use `real_cols' to compute
width.
2002-01-24 Tom Tromey <tromey@redhat.com>
* java/awt/Shape.java: Merged with Classpath.
......
......@@ -207,12 +207,12 @@ public class FlowLayout implements LayoutManager, Serializable
else
x = d.width - new_w;
for (int k = i; i < j; ++k)
for (int k = i; k < j; ++k)
{
if (comps[i].visible)
if (comps[k].visible)
{
Dimension c = comps[i].getPreferredSize ();
comps[i].setLocation (x, y);
Dimension c = comps[k].getPreferredSize ();
comps[k].setLocation (x, y);
x += c.width + vgap;
}
}
......
......@@ -320,8 +320,8 @@ public class GridLayout implements LayoutManager, Serializable
Insets ins = parent.getInsets ();
// We subtract out an extra gap here because the gaps are only
// between cells.
w = ins.left + ins.right + real_rows * (w + hgap) - hgap;
h = ins.top + ins.bottom + real_cols * (h + vgap) - vgap;
w = ins.left + ins.right + real_cols * (w + hgap) - hgap;
h = ins.top + ins.bottom + real_rows * (h + vgap) - vgap;
return new Dimension (w, h);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment