Ele não está retornando o caminho e entra no if do JOptionPane não importa o que eu faça.
public static String saida() {
JFileChooser filechooser = new JFileChooser();
filechooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
int saida = 0;
do {
if (filechooser.showSaveDialog(null) == JFileChooser.SAVE_DIALOG) {
return filechooser.getSelectedFile().getAbsolutePath();
}
if (JOptionPane.showConfirmDialog(null, "Deseja tentar novamente?",
"Erro", JOptionPane.YES_NO_OPTION) == JOptionPane.NO_OPTION) {
System.exit(0);
}
} while (saida == 0);
return null;
}