Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JButton Click event loses focus and the function behaves arbitrarily

 
Reading B
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I have an applet that runs in IE6.0 (Microsoft VM). This Applet contains swing components - buttons. These buttons are created on a button click event.
My problem is after creation of buttons, if I don't move my mouse and click again on a button to invoke the further creation of buttons, the focus moves on to some random button and the click happens on the respective button.
I am not having any clue why this is happening. This works perfectly if I move my mouse and try clicking the same button.
Please let me know your views/code suggestions.
Thanks a lot,
-Rock
 
Dana Hanna
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to post some code so that we can see what you're working with.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!