diff options
author | Tom Tromey <tromey@redhat.com> | 2002-01-29 16:31:24 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2002-01-29 16:31:24 +0000 |
commit | 6c54b16cef90d93555a96dc3542fea96b8a4c7fc (patch) | |
tree | ffdbcbe07428ddaf38f9f14443b7603db63fe23d /libjava/java/awt | |
parent | d09f7cb26b52857d6c0ada3c95560503da6f5f66 (diff) | |
download | gcc-6c54b16cef90d93555a96dc3542fea96b8a4c7fc.zip gcc-6c54b16cef90d93555a96dc3542fea96b8a4c7fc.tar.gz gcc-6c54b16cef90d93555a96dc3542fea96b8a4c7fc.tar.bz2 |
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
Diffstat (limited to 'libjava/java/awt')
-rw-r--r-- | libjava/java/awt/FlowLayout.java | 4 | ||||
-rw-r--r-- | libjava/java/awt/GridLayout.java | 4 | ||||
-rw-r--r-- | libjava/java/awt/Window.java | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/libjava/java/awt/FlowLayout.java b/libjava/java/awt/FlowLayout.java index a432a51..e328d63 100644 --- a/libjava/java/awt/FlowLayout.java +++ b/libjava/java/awt/FlowLayout.java @@ -212,8 +212,8 @@ public class FlowLayout implements LayoutManager, Serializable if (comps[k].visible) { Dimension c = comps[k].getPreferredSize (); - comps[k].setLocation (x, y); - x += c.width + vgap; + comps[k].setBounds (x, y, c.width, new_h); + x += c.width + hgap; } } 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) diff --git a/libjava/java/awt/Window.java b/libjava/java/awt/Window.java index b95dc8e..6af7c34 100644 --- a/libjava/java/awt/Window.java +++ b/libjava/java/awt/Window.java @@ -303,7 +303,7 @@ public class Window extends Container { // FIXME: return array containing all the windows this window currently // owns. - return null; + return new Window[0]; } /** |