We've been running into some issues with calling imageWindow.tofront()
not actually bringing the window "above" other windows. The purpose of
this is to then call WindowManager.getCurrentImage() to get the on
screen pixels of an image. Playing around things like setVisible() can
bring the window to the front, but we can't figure out how to force the
window to redraw immediately (so we can get the pixels). Doing
something like:
win.repaint()
thread.sleep(500)
works but is kludgy. Playing around with awt.EventQueue.invokeAndWait()
to try to flush awt events is something we can't get working either, and
I'm not sure that's a good way to attack it.
Is there a better / more proper way to do this?
I could have sworn there was a thread about this or something similar,
maybe a bug fix or a specific linux issue (we're on Ubuntu + Sun JRE
1.6)? But I can't find it.
Thanks,
Collin
The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.