Re: JTexPane: Cross-platform chaos
- From: Mark Thornton <mark.p.thornton@xxxxxxxxxxxxxxxxxx>
- Date: Sun, 28 Aug 2005 12:27:23 GMT
Wired Earp wrote:
I've extended a JTextPane to preserve tabindex and implement block-
indentation. It is supposed to work much like a code editor. Check out the resulting applet, rigged up for Firefox only, over at:
<url:http://www.wunderbyte.com/editorapplet>
I realize you may not have multuple operating systems running simultaniously, so you have to trust me on this: It works perfectly on Linux but fails on Windows. Things get calculated weirdly and unpredictably and I have absolutely no idea where to start looking:
- does Java on Windows not use '\n' and '\t' characters?
You have to use the platform specific line separator (\n on unix, \r\n for windows, \r for MAC). Use System.getProperty("line.separator") to obtain the correct value. Some things tolerate any of these line separators, while other code only functions correctly with the platform separator string.
Mark Thornton .
- Follow-Ups:
- Re: JTexPane: Cross-platform chaos
- From: Andrew Thompson
- Re: JTexPane: Cross-platform chaos
- References:
- JTexPane: Cross-platform chaos
- From: Wired Earp
- JTexPane: Cross-platform chaos
- Prev by Date: JTexPane: Cross-platform chaos
- Next by Date: Re: JTexPane: Cross-platform chaos
- Previous by thread: JTexPane: Cross-platform chaos
- Next by thread: Re: JTexPane: Cross-platform chaos
- Index(es):
Relevant Pages
|