Commit 257dd280 by Graydon Hoare Committed by Graydon Hoare

Container.java (swapComponents): Add forgotten function, required for JLayeredPane change.

2004-01-06  Graydon Hoare  <graydon@redhat.com>

	* java/awt/Container.java (swapComponents): Add forgotten
	function, required for JLayeredPane change.

From-SVN: r75491
parent 084f5a35
2004-01-06 Graydon Hoare <graydon@redhat.com>
* java/awt/Container.java (swapComponents): Add forgotten
function, required for JLayeredPane change.
2004-01-06 Michael Koch <konqueror@gmx.de> 2004-01-06 Michael Koch <konqueror@gmx.de>
* java/text/CollationElementIterator.java: Reformated. * java/text/CollationElementIterator.java: Reformated.
......
...@@ -159,6 +159,25 @@ public class Container extends Component ...@@ -159,6 +159,25 @@ public class Container extends Component
} }
/** /**
* Swaps the components at position i and j, in the container.
*/
protected void swapComponents (int i, int j)
{
synchronized (getTreeLock ())
{
if (i < 0
|| i >= component.length
|| j < 0
|| j >= component.length)
throw new ArrayIndexOutOfBoundsException ();
Component tmp = component[i];
component[i] = component[j];
component[j] = tmp;
}
}
/**
* Returns the insets for this container, which is the space used for * Returns the insets for this container, which is the space used for
* borders, the margin, etc. * borders, the margin, etc.
* *
......
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