A text editor in java