How to make JOptionPane.showConfirmDialog have No selected by default?

前端 未结 5 725
感动是毒
感动是毒 2020-12-11 00:04

I implemented a Save As dialog in Java that prompts the user if the file already exists, and I want the No option to be selected by default. How do I do this?

Here i

5条回答
  •  北海茫月
    2020-12-11 00:40

    For the above example, it is JOptionPane.showOptionDialog Those arguments can no be passed to showConfirmDialog because it does not have them.

    More people might be looking for this so why not offer a "working" solution.

提交回复
热议问题