Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #38476 > unrolled thread

Is there an easy way to show new lines?

Started byEric Douglas <e.d.programmer@gmail.com>
First post2018-07-06 08:00 -0700
Last post2018-07-06 10:28 -0700
Articles 2 — 1 participant

Back to article view | Back to comp.lang.java.programmer


Contents

  Is there an easy way to show new lines? Eric Douglas <e.d.programmer@gmail.com> - 2018-07-06 08:00 -0700
    Re: Is there an easy way to show new lines? Eric Douglas <e.d.programmer@gmail.com> - 2018-07-06 10:28 -0700

#38476 — Is there an easy way to show new lines?

FromEric Douglas <e.d.programmer@gmail.com>
Date2018-07-06 08:00 -0700
SubjectIs there an easy way to show new lines?
Message-ID<4424f943-3f5e-444f-8f71-2c73d6b717f8@googlegroups.com>
I'm using JTextArea and calling setLineWrap(true).  How can I let a user know where they have one line wrapped to display as two and where they have a hard carriage return?

[toc] | [next] | [standalone]


#38477

FromEric Douglas <e.d.programmer@gmail.com>
Date2018-07-06 10:28 -0700
Message-ID<8a3fe3f7-7b16-408d-a41f-10083f3b4bb5@googlegroups.com>
In reply to#38476
On Friday, July 6, 2018 at 11:01:00 AM UTC-4, Eric Douglas wrote:
> I'm using JTextArea and calling setLineWrap(true).  How can I let a user know where they have one line wrapped to display as two and where they have a hard carriage return?

A quick Google only finds that a JTextArea is not made to display the carriage returns, that you can do this with a JTextPane, which is kind of a pain.  JTextPane is not a drop in replacement, doesn't have the insert method much less the setLineWrap() or setWrapStyleWord(), so I'd somehow have to show 2 controls to use the JTextPane making that read only and reflecting the changes in the JTextArea?

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.java.programmer


csiph-web