@ All: Aplogize for a late reply. I tested different scenarios. And I found that the problem is with streaming processing. It seems that the combo box has not finished its work, and jdialog is opening. And after that, the combo box tries to complete its work, so the focus is lost in the parent window. I tried to open a dialog in a thread:
new Thread() { public void run() {
And it works great. Now I plan to open a dialog using SwingWorker:
SwingWorker worker = new SwingWorker() { @Override protected Object doInBackground() throws Exception {
This also works. Hope this is the right way. Please let me know if I am doing the right thing.
user613114
source share