JTextPane.setCaretPostion
From: Patrick (burcht61_at_hotmail.com)
Date: 08/31/04
- Next message: John Woo: "Does web-service support Entity or stateful ejb?"
- Previous message: Aquila Deus: "Re: Enable AA font globally"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 31 Aug 2004 05:01:23 -0700
Hello,
I have a JTextPane in a JScrollPane. My text contains 60000
characters. When moving the text to the JTextPane I set the
caretPosition to 0. This places the text top left at the first
position.
Now I want to set the caretPosition to 20000. This is the first
character of a line somewhere in the text. The scrollPane moves well
but it shows the line at the bottom of the scrollPane. I want it to
be the first visible line in the scrollPane, in other words position
20000 of the text must be in the top left corner of the scrollPane. I
searched for any example on the net, but I didn't found any.
How can I place the text correctly in the scrollPane ?
thanx for any answer.
Patrick.
- Next message: John Woo: "Does web-service support Entity or stateful ejb?"
- Previous message: Aquila Deus: "Re: Enable AA font globally"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|