How to display another Options Panel or any sorts of pop up in performOperation?
I'm trying to display a set of data fetched after clicking "Ok" in an Options panel. What should I implement in performOperation in order for me to display another pop up/Option panel?
Do your data fetching at the start of the performOperation method then use Dialogs.showDialog(...) to display the results. By default, this will cause the perform operation method to wait until the user closes the dialog then it will continue.0
That's displaying the retrieved data in a dialogue pop up right? Is there a way to display a JPanel that I designed myself.0
Yes, the message parameter to Dialogs.showDialog is type Object. You can pass any JComponent in as the message and it will be displayed.0
I see, thank you.0
I read the documentations for Dialogs and tried to implement what you suggested, but I kept on getting errors because I wasn't passing in the correct parameters. Would I have to create a DialogOptions Object to use this method? Or can I just use Options? Please see the attachments for the code that I'm working with.
Screen Shot 2015-12-18 at 3.20.38 PM.png
Screen Shot 2015-12-18 at 3.20.05 PM.png0
It looks like your DisplayGUIModel class could just extend JPanel directly, assuming it isn't being passed to Geneious as an options somewhere. There is no need to extend options otherwise.
Then you can display it like this:
DialogOptions dialogOptions = new DialogOptions(Dialogs.OK_CANCEL, "");
If you do need to extend Options then you can display it using Dialogs.showOptionsDialog() instead. This method is trickier to use though because you need to invoke it on the event dispatch thread.0
Thank you, it works now.0
Please sign in to leave a comment.