public void Run(Component comp, Graphics cg) { comp.Validate(); if (comp.Peer_Renamed is LightweightPeer) { comp.LightweightPaint(cg); } else { comp.Peer_Renamed.paint(cg); } }