简体   繁体   中英

Java Text Editor Api

I want to put a text editor in my java application. The editor has to have basic formatting features like fonts, bold, color etc..

Ideally I'd like to just add the Text Editor as a component to a JFrame.

Is there any library for this?

I think this could be simply done using a JEditPane, but I don't want to go through all the trouble of making an editor if I could just import one.

java.net上的这篇文章中 :看一下Ekit

The secton from the Swing tutorial on Text Component Features has a quick example how this might be done.

You can't just plug in a component and expect it to work as an editor. You need to add toolbars and menu items for your font, bold color features etc. The editor kits provided by Swing support all these basic features.

您可能想要查看SwingX (请参阅页面上的Java Web Start演示),尤其是JXEditorPane组件。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM