public void Run(Component comp, Graphics cg) { if (comp.Peer_Renamed is LightweightPeer) { comp.PrintHeavyweightComponents(cg); } else { comp.PrintAll(cg); } }