Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JList  RSS feed

 
zoe goddard
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm sure I've seen a way to make sure that a selected item becomes visible in a JList. I can't seem to find it. Anyone remember what it is called.
I have
list.setSelectedIndex(0);
// Now I want to make sure it is in visible portion of the
// list.
Thanks for any help.
 
Angela Lamb
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think list.ensureIndexIsVisible(int index) is what you're looking for.
 
zoe goddard
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that's what I'm looking for. Thanks, I'll give it a try
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!