Hold down the mouse and drag to paint! Click the icons to change the pen color, erase or clear. Change the value of the 'width' variable to change the pen width.
Credit to CSFirst and CodeClubRik.