File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes JTextArea, JEditorPane or JTextPane: which is better suited for my application? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JTextArea, JEditorPane or JTextPane: which is better suited for my application?" Watch "JTextArea, JEditorPane or JTextPane: which is better suited for my application?" New topic
Author

JTextArea, JEditorPane or JTextPane: which is better suited for my application?

Isuru Sampath
Ranch Hand

Joined: Jun 26, 2003
Posts: 56
Thanks for reading my post.

I need a component to create an application which has a simple text editor functions. Intended functions include adding, deleting and inserting characters. No need to bold, Italics, Underlining or any other fancy formatting since I'm writing the outpt to a text file. Which of the following is ideal for this purpose:

  • JTextArea
  • JEditorPane
  • JTextPane


  • Can you kindly explain any advantages of using the either component.
    [ November 03, 2006: Message edited by: Isuru Sampath ]

    No Winds No Waves
    Michael Dunn
    Ranch Hand

    Joined: Jun 09, 2003
    Posts: 4632
    > Can you kindly explain any advantages of using the either component.

    this would probably explain it better for you

    http://java.sun.com/docs/books/tutorial/uiswing/components/text.html
     
    I agree. Here's the link: http://aspose.com/file-tools
     
    subject: JTextArea, JEditorPane or JTextPane: which is better suited for my application?
     
    Similar Threads
    Alter JTextPane to turn off word wrap?
    How to handle ENTER key event in JTextArea
    Multiple text selection in JTextArea
    Equivalent of setText for JTextPane's
    Multicolored JTextPane/ JEditorPane/ JTextArea output