// when the component is heavyweight.
Component comp = (Component) source;
ComponentPeer peer = comp.peer;
if (peer != null && evt instanceof PaintEvent
&& ! (peer instanceof LightweightPeer))
peer.coalescePaintEvent((PaintEvent) evt);
// Check for any events already on the queue with the same source
// and ID.
AWTEvent previous = null;
for (AWTEvent qevt = q.queueHead; qevt != null; qevt = qevt.queueNext)