This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Editplus/JEdit style word wrap in JTextArea

 
Jigar Gosar
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
chandu sekhar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic