Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JEditorPane cursor position and an outer scrollbar position

843807Jun 5 2010 — edited Jun 8 2010
hi all ,

Sorry if the title confused you and sorry again if i am reposting something which was already present in the forum.

I have an application , the main component being an awt Frame. I have added a jscrollpane with both horizontal and
vertical scroll bars . To this scroll pane i added a jpanel which consists of several components including an JEditorPane
Everything works fine.

But when i type in the editor pane , if its size is too large (height) and the cursor keeps on coming down , but the scrollpane's
vertical scroll bar doesnt move, making the cursor hidden from view.
What i want to do is : based on the caret position in the JEditorPane i want to update( move ) the horizontal scroll bar of the
scroll pane up or down.

Is it possible ? I think and hope it is . How do i do it ? Any Hints , Ideas to get me started ?

I am using jdk 1.6 , windows Xp with sp 2.

Thanks,
martin

Edited by: blackstreak on Jun 5, 2010 1:56 AM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 6 2010
Added on Jun 5 2010
4 comments
378 views