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
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user