I checked around and I can't find a jar file with just a text editor in it.
However, heres 2 other options
Option A Use Swing and build one yourself. Swing has a lot of the componenets already covered in javax.swing.text, although it still requires an extensive amount of code. I found an example here
Option B Scavenge code from an open source project. I found 2 projects with realy nice HTML WYSIWYG type editors that can be extracted (both are contained in just a few classes).
- Memoranda (GPL): Its text edit or is in net.sf.memoranda.ui.htmleditor.HTMLEditor. Its a JPanel and only uses one other class.
- Ekit (LGPL): Its a full featured WYSIWYG Html editor. Its com.hexidec.ekit.EkitCore class is a JPanel and seems fairly multipurpose, although it uses a lot of other classes from the package.
There are also a bunch of commercial ones available, assuming you have a budget :)