Java text editor created from scratch