Java paint program (school project)