Seriously: I'd start by looking at freshmeat.net and sourceforge.org. Search for "java editor". Look how many there are. Pick a few, download them, look at the code until the urge to do it goes away. Don't waste your time reinventing the wheel.
If you have particular features you want to implement in an editor, implement them as plugins to an existing editor or
IDE that supports plugins. I'd suggest Eclipse (www.eclipse.org) but there are plenty of others.