title: action listener to JDialog for clicked button
body: <p>I have main application where is table with values. Then, I click "Add" button, new CUSTOM (I made it myself) JDialog type popup comes up. There I can input value, make some ticks and click "Confirm". So I need to read that input from dialog, so I can add this value to table in main application.
  How can I listen when "confirm" button is pressed, so I can read that value after that?</p>
  
  <pre><code>addISDialog = new AddISDialog();
  addISDialog.setVisible(true);
  addISDialog.setLocationRelativeTo(null);
  //somekind of listener...
  //after "Confirm" button in dialog was pressed, get value
  value = addISDialog.ISName;
  </code></pre>