Basic Java text editor implemented using Swing