Java JList scroll to selected item?

You can use the ensureIndexIsVisible method java.sun.com/javase/6/docs/api/javax/swi...) Scrolls the list within an enclosing viewport to make the specified cell completely visible. This calls scrollRectToVisible with the bounds of the specified cell. For this method to work, the JList must be within a JViewport.

Or, if multi-selection is enabled : dataList. ScrollRectToVisible( dataList. GetCellBounds( dataList.

GetMinSelectionIndex(), dataList. GetMaxSelectionIndex() ) ).

Its dataList. GetMinSelectionIndex() however, the answer is still useful for me :) – Fortega Oct 9 '09 at 15:06 Thanks - edited code from Selelected to Selection – Nate Oct 9 '09 at 17:00.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions