I have introduced a bit of code under:
With the goal being to adjust the JXEditorPane's scrollbar iff the scrollbar
is at the end/maximum position, otherwise leave it in the current position.
The implementation strategy basically captures the viewport position just
prior to appending the new text. if the position is not at the end/maximum
then the viewport is adjusted under a EventQueue.invokeLater() thread.
The code appears to work fine in the standalone app (ie incubator) but when
included within a larger Swing application (myjxta2.jxta.org) it fails.
While I'm at it, any pointers on how best to capture and consume (vs propogate)
a enter key press event? By adding a KeyListener to my JXEditorPane I can see
when the key is pressed but I'm not sure how best to prevent the kestroke from
getting processed by the underlying document.
Java == platform independence
XML == application independence
JXTA == network independence
Secure End-to-End Computing