As you can see in the title I want to create a popup who can work when the program is stop.
This popup will be used for confirm one action. In my case, I have created a Delete button for my parameters and I want a popup for saying " Would you really delete theses parameters" and I need a button OK and a button Cancel.
Yes, the script command belongs in the generateScript()-Method.
If you want to make the received variable displayed for the user you can take a look at the cyclecounter-example and read into the ‘working_with_variables.pdf’ manual.
In the sendScriptWithButton sample a simple popup created. Is there a way to rename buttons on the popup?
I need to create a popup with two custom buttons (Cancel and Start) and handle clicks on them.
Is there a way to do this?
Mh… You will have to create your own custom popup for this . the sendscriptwithbutton is using the popup from polyscope and if I’m right you can’t “modify” this popup.
Your popup has to work when the program is running or not?
If it’s not the case I can suggest you to create a div and show the div when your value is changed and once than you have pressed start or cancel the div will be hided.
I am using this functionality for having different window by example.
You can create it like this
public static void setErrorPopup(String message, String title){
JOptionPane pane=new JOptionPane();
pane.showMessageDialog(new JFrame(),message,tittle,JOptionPane.ERROR_MESSAGE);
}
it work fine but the grafic of the popup is horrible. If you can fix this you solved your problem