How to use GenericDialogPlus?

Hello!
I have successfully managed to write a “Hello World” Plugin for Fiji (with this link: https://github.com/imagingbook/imagej1-plugins-ide-setup/tree/master/project-intellij)
Now want to make a GUI with a Filechosser and other things. GenericDialogPlus seems to be the right choise since it somehow dont show up with swing components (tried a botton) or is not buildable.
I managed to use GenericDialog but this lacks the oportunitiy of a Directory/File chooser.

47

Can someone help me how I can use it? (step by step would be awesome!)
Thanks in advance!
Anna

1 Like

Dear @AnnaF,

I cannot provide a step-by-step guide, but a code snippet that might help:

This plugin asks the user for two folders (asking for files is similar and straight forward) and some more stuff, shows the dialog and cancels the process, if the user decides so.

Let me know if it helps :wink:

Cheers,
Robert

Hello Robert!

Thank you for your fast reply!
I cant import for example: fiji.util.gui.GenericDialogPlus;
Do I have to Install something?

Cheers,
Anna

1 Like

Sorry for not mentioning; you might need to add the fiji dependency to your pom file:

Cheers,
Robert

Aaaaand, if you don’t have a pom file yet, please check out this video:

(They use Eclipse, but it works the same way with Intellij).

I’m afraid the book resource you mentioned initially is for ImageJ1 plugin development while I referred to ImageJ2/Fiji plugins.

2 Likes

Awesome! worked perfectly. Thank you a lot!

1 Like