Changed the Grapgics object in render() to final.