How do i work on an image while using a pop up menu?

i want a simple user interface where you can select yore images in a popup menu that always stays on the screen.
at the moment am using Dialog.addChoice(); in a while lop to select my images. but i have found a fault with it an that is that I cant do anything with my images without ending the loop.
So i was wondering if there is a way to putt the images i one widget with the menus or if there i a way to interact with the images while having the dialog box open.

Unfortunately I don’t think there is a way with a quick script.

You’d need to implement an InteractiveCommand or InteractiveImageCommand to make this work, in either Groovy or Java…
You can see this page for some example links
https://javadoc.scijava.org/ImageJ/net/imagej/command/InteractiveImageCommand.html

what do you mean by implement can i still use my old code or should I replace it?