-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Monday 25 October 2004 14:02, Ren� Kanters wrote:
> I noticed that if I comment out the
> consoleTextPane.setCaretPosition(offs + str.length());
> (line 433 in ScriptWindow.java)
> The 'bad location' is not trown at me any more.
> Checking the JTextComponent.setCaretPosition method in Java reference
> 1.4.2 says:
>
> "Note that the caret tracks change, so this may move if the underlying
> text of the component is changed."
>
> So maybe, it wasn't necessary anyway.
>
> Not sure whether that is the same for all swing implementations on all
> VMs.

I was trying to implement a Clear button for the script window, and noted how 
the console 'gets' the command typed... and this is done by:
1. determine the line of the prompt
2. on that line take char 3 to end of line

And this gives problems when output to the Console does not end with a new 
line... 

I think the fix is easy: just do a new line before printing the prompt... I'll 
try and if it works I will upload after I've completed the Clear button...

Egon

- -- 
[EMAIL PROTECTED]
- ---------------------------------------
CDK: http://cdk.sf.net/
JChemPaint: http://jchempaint.sf.net/
Jmol: http://www.jmol.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (SunOS)

iD8DBQFBfjaBd9R8I9Yza6YRAnZhAJ90HHgcHsEIhSTCM2+OFnHYpDFaCgCgyGao
u6H0Wt+40NkJwMfiGtTXYyo=
=0cm5
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to