Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

radio buttons not focusable...continued  RSS feed

 
Andrew Brown
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • 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 ]
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • 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.
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • 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.
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed. Moving this one to Swing/AWT, as well.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!