Can someone please explain me how JScrollPane works. In JScrollPane we use ComponentListener which has the callback method which sets the scrollbar position.
Here I am not able to understand that how do we generate the event which causes the ComponentListener to readjust the scrollbar.
Actually, I am writing a custom Scroll pane similar to JScrollPane. I have added the ComponentListener to the view of scrollpane. But, I am not able to understand how the events will be fired.
I have added the JList in the scrollpane but it is not scrolling. Should I change the y position of the list to generate the ComponentListener callback which will readjust the scrollbar postion.