From 6c54b16cef90d93555a96dc3542fea96b8a4c7fc Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Tue, 29 Jan 2002 16:31:24 +0000 Subject: GridLayout.java (layoutContainer): Use number of rows to compute height of each cell... * java/awt/GridLayout.java (layoutContainer): Use number of rows to compute height of each cell, and number of columns to compute width of each cell. * java/awt/Window.java (getOwnedWindows): Don't return null. * java/awt/FlowLayout.java (layoutContainer): Set width and height of component. Increment x using horizontal gap, not vertical gap. From-SVN: r49320 --- libjava/java/awt/GridLayout.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libjava/java/awt/GridLayout.java') diff --git a/libjava/java/awt/GridLayout.java b/libjava/java/awt/GridLayout.java index e6cf1ec..3471865 100644 --- a/libjava/java/awt/GridLayout.java +++ b/libjava/java/awt/GridLayout.java @@ -172,9 +172,9 @@ public class GridLayout implements LayoutManager, Serializable // Compute width and height of each cell in the grid. int tw = d.width - ins.left - ins.right; - tw = (tw - (real_rows - 1) * hgap) / real_rows; + tw = (tw - (real_cols - 1) * hgap) / real_cols; int th = d.height - ins.top - ins.bottom; - th = (th - (real_cols - 1) * vgap) / real_cols; + th = (th - (real_rows - 1) * vgap) / real_rows; // If the cells are too small, still try to do something. if (tw < 0) -- cgit v1.1