I have a part of my app that takes a screenshot of a certain window but before I do so I want to bring the window to the front. This works fine on my Mac machine but when I tested it on in Windows XP on paralells the screenshot always has a greyed out area where the overlapping window was. It seems the screenshot is always taken while the window I want on top is being transfered to the top. Ive tried using both:
frame.setVisible(true);
and
frame.setAlwaysOnTop(true);
Does anyone have a reasonable solution for this issue?