aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Editplus/JEdit style word wrap in JTextArea Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Editplus/JEdit style word wrap in JTextArea" Watch "Editplus/JEdit style word wrap in JTextArea" New topic
Author

Editplus/JEdit style word wrap in JTextArea

Jigar Gosar
Ranch Hand

Joined: Jul 09, 2002
Posts: 95
I want to create a simple text editor, with Editplus/JEdit style word wrap. The word wrap in JTextArea does not indent properly for lines begining with tabs.
example:
--------------------------------------------------
JTextArea word wrap:


--------------------------------------------------
Editplus/JEdit style word wrap:


--------------------------------------------------
i hope i have made my self clear. below is the code i use to achieve wordwrap in JTextArea.

Can any one tell me how can i achieve Editplus/JEdit style word wrap with JTextArea.

Any help is appreciated.

regards,
jigar


[ December 09, 2005: Message edited by: Jigar Gosar ]

Regards,<br />Jigar Gosar (SCJP 1.4)<br />visit: <a href="http://jigar.org/blog" target="_blank" rel="nofollow">http://jigar.org/blog</a>
chandu sekhar
Greenhorn

Joined: Apr 22, 2004
Posts: 4
hi friend,

I have developed a small program that works exactly as notepad. I noticied using JEditorPane is more useful than JTextPane. JEditorPane handles all types of contents. it is as stright as JTextPane.

Happy working...

Chandu.
Jigar Gosar
Ranch Hand

Joined: Jul 09, 2002
Posts: 95
i dont mind working with JEditorPane/JTextPane, but note[ad style wordwrap is excatly what i dont want.

i just want to achieve Editplus/JEdit style indented word wrap. so any help in this regard will be apreciated.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Editplus/JEdit style word wrap in JTextArea