Display an ImagePlus

Hi there,

I’m sorry to ask a probably stupid question but i’m stuck on a trivial problem.

In my code I generate an ImagePlus from a screen capture than I send it to a function that create a custom window.

The problem is that my ImagePlus do not paint

my code is

public void UIResultats(ImagePlus screen) {
		screen.show();
		IJ.wait(2500);
                  // Durring all the wait time I see a empty frame with no image in it
		IJ.showMessage("Open Image done");
                 // when the IJ message appear the frame is correctly paint and I see my ImagePlus correclty

	}

For now I put the showMessage to get the painting, but I would get rid of this useless message.
I’m probably missing something stupid.

I’m on Linux Mint 18 but I experiment the same problem on Windows.

Best regards,

Salim

Sorry I found clues that my problem is deeper than that.
It seems to be linked that we open a second custom stack in the same program.
No idea where the problem come from but I will search I may provide a more detailed problem report.

Salim