395 |
layoutMgr.addLayoutComponent(null, comp); |
layoutMgr.addLayoutComponent(null, comp); |
396 |
} |
} |
397 |
|
|
398 |
if (isShowing ()) |
// We previously only sent an event when this container is showing. |
399 |
{ |
// Also, the event was posted to the event queue. A Mauve test shows |
400 |
// Post event to notify of adding the component. |
// that this event is not delivered using the event queue and it is |
401 |
ContainerEvent ce = new ContainerEvent(this, |
// also sent when the container is not showing. |
402 |
ContainerEvent.COMPONENT_ADDED, |
ContainerEvent ce = new ContainerEvent(this, |
403 |
comp); |
ContainerEvent.COMPONENT_ADDED, |
404 |
getToolkit().getSystemEventQueue().postEvent(ce); |
comp); |
405 |
|
ContainerListener[] listeners = getContainerListeners(); |
406 |
|
for (int i = 0; i < listeners.length; i++) |
407 |
|
listeners[i].componentAdded(ce); |
408 |
|
|
409 |
// Repaint this container. |
// Repaint this container. |
410 |
repaint(); |
repaint(comp.getX(), comp.getY(), comp.getWidth(), |
411 |
} |
comp.getHeight()); |
412 |
} |
} |
413 |
} |
} |
414 |
|
|