Hi, This is a small addition to my patch from yesterday. Tom asked whether the conditions for removeNotify() were exactly the reverse of the addNotify() call. In Container there was one case were we wouldn't call removeNotify() on a Component if it was not currently showing. That is wrong since in that case if the Component was then later readded to another Container the peer would not be recreated for that Component. This patch fixes that:
2006-03-04 Mark Wielaard <[EMAIL PROTECTED]> * java/awt/Container.java (remove(int)): Always call removeNotify() on removed Component. Tested against all the usual suspects (vte, hsqldb, megamek) and everything works fine. Committed, Mark diff -u -r1.83 Container.java --- java/awt/Container.java 28 Feb 2006 11:27:15 -0000 1.83 +++ java/awt/Container.java 4 Mar 2006 11:32:07 -0000 @@ -410,8 +410,7 @@ for (int j = 0; j < list.length; j++) r.removeComponentListener(list[j]); - if (r.isShowing()) - r.removeNotify(); + r.removeNotify(); System.arraycopy(component, index + 1, component, index, ncomponents - index - 1);
signature.asc
Description: This is a digitally signed message part