Code for Gpen.java class, The start of the drawing project