Moves non-Swing code from P_Swing to Platform