I have a combo box. After selecting an item in combo box new JDialog opens.
- When i use JDK 1.6_06, I am able
to click on buttons in JDialog
properly. - When i use JDK 1.6_24,
then i need to click anywhere in
JDialog first. Then only clicking on
button works. Firstly i thought this
is some issue with the focus. But
component works fine with JDK
1.6_06. But its a issue only with JDK 1.6_24.
I tried to google it. But didnt find any answer. Does anybody have any idea?
@All: Aplogize for late reply. I was trying out different scenarios. And i have found that issue is with the threading. It seems that combo box is not yet finished its work, and jdialog is opened. And after that combo box tries to finish its work, so the focus is lost to the parent window. I tried opening dialog in thread:
And it works fine. Now i am planning to open dialog using SwingWorker:
This is also working. Hope this is the right way. Please let me know, if I am doing a right thing.