Hi,
I have attached a JScrollPane to a text area.
the code is as follows.
JScrollPane jsp = new JScrollPane( jtx1 );
however since the contents in the JTextArea is large horinontally, the text gets displayed in the textarea. However the scroller in the JScrollPane gets positioned towards the end of the text. How do I specify to make sure that the Scroller is always in the start of the text?
and also i wanted the Vertical ScrollBar to be always visble and what i did was:
int vpolicy = jsp.getVerticalScrollBarPolicy();
jsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
The Vertical ScrollBar gets displayed. However I am not ablt to see the scroller in the JScrollPane's vertical bar as I don't have sufficient text vertically. How do i specify that the scroller always be present in my vertical side...irrespective of the contents in the Textarea. i.e i always want to scroll. (I see the ScrollBAr. however am not able to scroll b'coz i have less text.)
Thanks!
Regards,
Karthik.
I have attached a JScrollPane to a text area.
the code is as follows.
JScrollPane jsp = new JScrollPane( jtx1 );
however since the contents in the JTextArea is large horinontally, the text gets displayed in the textarea. However the scroller in the JScrollPane gets positioned towards the end of the text. How do I specify to make sure that the Scroller is always in the start of the text?
and also i wanted the Vertical ScrollBar to be always visble and what i did was:
int vpolicy = jsp.getVerticalScrollBarPolicy();
jsp.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
The Vertical ScrollBar gets displayed. However I am not ablt to see the scroller in the JScrollPane's vertical bar as I don't have sufficient text vertically. How do i specify that the scroller always be present in my vertical side...irrespective of the contents in the Textarea. i.e i always want to scroll. (I see the ScrollBAr. however am not able to scroll b'coz i have less text.)
Thanks!
Regards,
Karthik.