• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

radio buttons not focusable...continued

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
my previous thread was closed, don't know why? i have an applet with a set of animations that are activated by keys, the focus must stay on the contentPane of the applet in order for the animations to still be activated by the keys.

I have a couple of radioButtons that when i press one of the options the focus remains on the radio button.

I have tried the setFocusable(false); and this is not compatible, anyone got any ideas on this.

ps : - i have used the set focusable false on all the other components and this works fine.
[ May 05, 2006: Message edited by: Andrew Brown ]
 
Ranch Hand
Posts: 2412
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You need to call setFocusable(true) and requestFocus() on the component that is listening for the keys after every time a radio button is selected or deselected.
 
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you look just below the moose head on your previous post, you'll see why it was closed. The same will probably happen to this post.
 
author and iconoclast
Posts: 24207
46
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Indeed. Moving this one to Swing/AWT, as well.
 
reply
    Bookmark Topic Watch Topic
  • New Topic