Graphics editing program in Java