Commit 22d5af9a by Tom Tromey Committed by Tom Tromey

GridLayout.java (layoutContainer): Handle case where there are no items in container.

	* java/awt/GridLayout.java (layoutContainer): Handle case where
	there are no items in container.

From-SVN: r50539
parent 3ec1b4cb
2002-03-10 Tom Tromey <tromey@redhat.com>
* java/awt/GridLayout.java (layoutContainer): Handle case where
there are no items in container.
* java/lang/Win32Process.java: Added comment.
* include/posix.h (_Jv_platform_close_on_exec): New function.
Include fcntl.h.
......
......@@ -152,6 +152,12 @@ public class GridLayout implements LayoutManager, Serializable
public void layoutContainer (Container parent)
{
int num = parent.ncomponents;
// There's no point, and handling this would mean adding special
// cases.
if (num == 0)
return;
// This is more efficient than calling getComponents().
Component[] comps = parent.component;
......
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