Skip to content

Commit

Permalink
Remove "Are you Sure" Dialog.
Browse files Browse the repository at this point in the history
I only took a brief look and didn't test it out however this should do the trick.

Closes #66
  • Loading branch information
vanniktech authored Apr 15, 2018
1 parent af4b77f commit 97e7d97
Showing 1 changed file with 0 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,6 @@ public void actionPerformed(ActionEvent event) {
protected void doOKAction() {
if (model == null) return;

if (!isConfirmed()) return;

if (alreadyFileExists()) {
final int option = JOptionPane.showConfirmDialog(panelMain,
"File already exists, overwrite this ?",
Expand Down Expand Up @@ -756,18 +754,4 @@ protected ValidationInfo doValidate() {

return null;
}

public boolean isConfirmed() {
Object[] options = {"Yes", "No"};
int option = JOptionPane.showOptionDialog(panelMain,
"Are you sure you want to generate '" + model.getFileName() + "' ?",
"Confirmation",
JOptionPane.OK_CANCEL_OPTION,
JOptionPane.PLAIN_MESSAGE,
new ImageIcon(getClass().getResource(ICON_CONFIRM)),
options,
options[0]);

return option == JOptionPane.OK_OPTION;
}
}

0 comments on commit 97e7d97

Please sign in to comment.