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

Getting Focus in a JList  RSS feed

 
Barry Brashear
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have had a reoccuring problem of focus not being
on the JList when my application goes to QA for testing. They have to first press the tab key to
highlight the JList. Does anyone know how I can achieve this? I have already tried requestFocus() and requestDefaultFocus().
Thanks,
Barry
 
Chantal Ackermann
Ranch Hand
Posts: 508
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
what do you mean by "highlight the JList"? the selection of a row?
you can easily transfer focus to the JList by preselecting the first row for example. by default no row is selected.
cheers,
Chantal
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!