Note that there are some explanatory texts on larger screens.

plurals
  1. POGeneric Dialog Ok not triggered the second time
    primarykey
    data
    text
    <p>i have created a static instance of a generic dialog in my program</p> <pre><code>static GenericDialog SaveDialog = null; </code></pre> <p>and below is the code to display the dialog</p> <pre><code>public boolean DispSaveDialog() { //gd.addStringField("Identity : ", "annot"); if(SaveDialog == null) { SaveDialog = new GenericDialog("Save"); Panel idnPanel = new Panel(); idnPanel.add(new Label("Identity")); idnTextComp = new TextField("annot"); csPrefix = idnTextComp.getText(); TextListener tl = new TextListener() { @Override public void textValueChanged(TextEvent e) { // TODO Auto-generated method stub csPrefix = idnTextComp.getText(); } }; idnTextComp.addTextListener(tl); idnPanel.add(idnTextComp); SaveDialog.addPanel(idnPanel); final TextComponent textComponent = new TextField(); ActionListener al = new ActionListener() { @Override public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub String label = e.getActionCommand(); //csPrefix = gd.getNextString(); if (label=="Browse") { String csFilename = imp.getTitle(); csTextFileName = FileNameProcess( csFilename ); } textComponent.setText(csTextFileName); } }; Button btBrowse = new Button("Browse"); btBrowse.addActionListener(al); Panel panel = new Panel(); panel.add(new Label("Folder : ")); //textComponent.setBounds(gd.getBounds()); panel.add(textComponent); panel.add( btBrowse ); SaveDialog.addPanel(panel); } SaveDialog.showDialog(); return true; } </code></pre> <p>the issue i am facing is, when i open the dialog the second time, the OK and Cancel events are not triggered. i have a feeling that the issue is silly, sorry and thanks in advance.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload