JScrollPane question?
Is there a way to have a vertical ScrollBar seperated from its Scrollpane? It would be able to function the same, just not be connected. i.e.,a scrollable list on the left side of a frame, buttons or something in the middle somewhere and then the scrollbar that controlls the list on the right side of the frame(detatched from the list)?
any ideas?
thanks in advance
[392 byte] By [
yeti17] at [2007-9-26 3:25:53]

Sure, you can use the JScrollBar component outside of a scroll pane - it is just another component. You can set up the bounded range model and listen for changes in the scroll position, and move your list around as you see fit.
If you want to do this properly, you can have your JList in just a JViewport without the rest of the scroll pane stuff. This will make it somewhat easier to integrate with the stand-alone scroll bar.
Mitch Goldstein
Author, Hardcore JFC (Cambridge Univ Press)
mdgoldstein@hotmail.com
mitchg at 2007-6-29 11:47:11 >
