working text editor in java