Simple text editor created in java