开发者

Looking for a swing (or other) text editor component that has document selectors

I am creating a java app that needs to display multiple documents worth of plain text. I have been playing around with JEditorPane (for each document to display text) with JTabbedPane (for document selection) but I think I would prefer to use something better (if it exists).

Is there an existing class that creates a dead simple editor wi开发者_如何学JAVAth document selector functionality built in?


Nothing is built-in to do this, but JDesktopPane might be a better option for selection rather than a JTabbedPane.


For plain text, I would tend to prefer JTextArea "that displays multiple lines of text and optionally allows the user to edit the text." It is described in the article How to Use Text Areas. The append() method is particularly convenient. The articles Text Area Scrolling and Message Console are also very helpful.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜