Setting the JScrollPane properties
1 posts in topic
Flat View  Flat View

Posted By:   charu_mundale
Posted On:   Wednesday, May 15, 2002 03:00 AM

Hi everyone
I want some solution for setting the property of JScrollPane
I am using JTextPane and JList in JScrollPane. Now when i am adding the items in those components the vertical scrollbar of JScrollPane moves up which I dont want. I want that any time the scrollbar(vertical) should remain at the bottom even if the items in the components gets increased.

How to do this?
please help me to solve this.

from charudatta

Re: Setting the JScrollPane properties

Posted By:   Samir_Randive  
Posted On:   Wednesday, May 15, 2002 10:48 PM

-Get the viewport of the scrollpane.

-In the focuslistener for the JTextPane or ItemListsner for the JList, add viewport.setViewPosition(new Point(0,0))
About | Sitemap | Contact