Simple Editor in Java