Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #30511
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Martin Gregorie <martin@address-in-sig.invalid> |
| Newsgroups | comp.lang.java.programmer |
| Subject | JEditorPane question |
| Date | Mon, 8 Dec 2014 13:47:43 +0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 28 |
| Message-ID | <m64a5v$d3j$1@dont-email.me> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Mon, 8 Dec 2014 13:47:43 +0000 (UTC) |
| Injection-Info | mx02.eternal-september.org; posting-host="e5160e2be48f1ea550cf61512446f525"; logging-data="13427"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19VhyZvTtzGivDIjHRtlmH4Npx+vP3jSZ0=" |
| User-Agent | Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) |
| Cancel-Lock | sha1:O8rAPXwEm1f5fmn5aP8l/C0+lHQ= |
| Xref | csiph.com comp.lang.java.programmer:30511 |
Show key headers only | View raw
Just a quicky: is there any way to force the newline symbol that JEditorPane outputs the the display to take a value that isn't native for the OS the application is running on? Why I'm asking: I need to pass data from a Linux system to Windows-based website by copy & paste between a JEditorPane in my Java application and an input area on a web page. The web application is expecting CRLF newlines. My application uses String.replace() to convert newlines to CRLF before the string is passed to the JEditorPane via its setText() method. However, when I copy the displayed text from the screen it always has the Linux LF linebreak in it rather than the CRLF. According to the class description that the DefaultEditorKit sets itself up to use the first linebreak when data is loaded into it. There are hints in the description that the EndOfLineStringProperty can be changed, but as its declared final, this is never going to work. So, my question: does anybody know how to change the linebreaks used by the editor after its been started and, particularly, if its possible to change the linebreak symbol used in the JEditorPane's on screen display area? -- martin@ | Martin Gregorie gregorie. | Essex, UK org | .
Back to comp.lang.java.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
JEditorPane question Martin Gregorie <martin@address-in-sig.invalid> - 2014-12-08 13:47 +0000
Re: JEditorPane question Jeff Higgins <jeff@invalid.invalid> - 2014-12-08 17:48 -0500
Re: JEditorPane question Martin Gregorie <martin@address-in-sig.invalid> - 2014-12-08 23:30 +0000
Re: JEditorPane question Jeff Higgins <jeff@invalid.invalid> - 2014-12-08 19:14 -0500
Re: JEditorPane question Jeff Higgins <jeff@invalid.invalid> - 2014-12-08 19:49 -0500
Re: JEditorPane question Jeff Higgins <jeff@invalid.invalid> - 2014-12-08 20:48 -0500
Re: JEditorPane question Jeff Higgins <jeff@invalid.invalid> - 2014-12-08 21:21 -0500
Re: JEditorPane question Jeff Higgins <jeff@invalid.invalid> - 2014-12-08 21:37 -0500
Re: JEditorPane question Jeff Higgins <jeff@invalid.invalid> - 2014-12-08 23:11 -0500
Re: JEditorPane question Jeff Higgins <jeff@invalid.invalid> - 2014-12-08 23:28 -0500
Re: JEditorPane question Martin Gregorie <martin@address-in-sig.invalid> - 2014-12-11 18:31 +0000
Re: JEditorPane question Martin Gregorie <martin@address-in-sig.invalid> - 2014-12-09 09:41 +0000
Re: JEditorPane question Jeff Higgins <jeff@invalid.invalid> - 2014-12-09 22:41 -0500
Re: JEditorPane question Jeff Higgins <jeff@invalid.invalid> - 2014-12-10 00:46 -0500
csiph-web