Need help in Swing multithreading

S

swapnil.kale

Hi,
I'm stuck in a strange problem in Swing multithreading. Any help would
be appreciated.

In my application / project, <a migrated code through tool> a thread
which is the "main grid" window runs continuously to listen to changes
for the application. The other window whcih is launched through the
main grid creates an alert due to change in the data on the window.
This thread now waits for the next input.
The alert created gets consumed by the main
grid and appropriate action is taken. After this it again waits for
the next event to occur, but once this is done, the main grid gains
the focus as the code completes last in the main grid and not at the
other window where it is expecting the input.

I hope i'm making it explicit. Please suggest me inputs on how can i
regain the focus on the window expecting the next input.

Thanks in advance for the help.

Regards,
Swapnil
 
K

Knute Johnson

Hi,
I'm stuck in a strange problem in Swing multithreading. Any help would
be appreciated.

In my application / project, <a migrated code through tool> a thread
which is the "main grid" window runs continuously to listen to changes
for the application. The other window whcih is launched through the
main grid creates an alert due to change in the data on the window.
This thread now waits for the next input.
The alert created gets consumed by the main
grid and appropriate action is taken. After this it again waits for
the next event to occur, but once this is done, the main grid gains
the focus as the code completes last in the main grid and not at the
other window where it is expecting the input.

I hope i'm making it explicit. Please suggest me inputs on how can i
regain the focus on the window expecting the next input.

Thanks in advance for the help.

Regards,
Swapnil

Component.requestFocusInWindow()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top