A simple text editor in Scala Swing