Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Focus issues with SWT Button  RSS feed

 
Jack Wanes
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am on Eclipse 3.3. I have two buttons sit side by side. Once I click on one button, I want this button gain focus. If I then click on second button, I want second button gain focus and let first button lose focus. But the behavior does not seem to work out this way. Once I click on one of the buttons, it first gains focus then lost focus. Is this some kind of bug? If this is not a bug, how can I achieve what I want.

Here is the printout when I click on testButton1 first and testButton2 second:
testButton1 focusGained
testButton1 focusLost
testButton2 focusGained
testButton2 focusLost

Here is the test program:

regards,
 
Rob Spoor
Sheriff
Posts: 21087
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please Use Code Tags.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!