Only recently did you know Javagui programming. I think, write a notepad independently, to set the Monitor in the dialog box of the button. But looking for the API the corresponding method has been found, only to find:
Returns:
An integer indicating the option selected by the user
Showconfirmdialog This method simply returns an int value to identify which button is selected by the user. Looking for a half day also did not find the way to set up monitoring ...
。。
Just then ....
。 A flash of inspiration ~ ~ ~
A very many method returns 0 under normal conditions, and returns 1 if it is not normal.
So I tested it with the following code, for example:
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvbglhbmdjywl5dw4ymdez/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/southeast ">
After I clicked Yes, there was a result:
The "Yes" button on the Description dialog box corresponds to an int value of 0
So don't set up the listener. Add the code that you want to complete directly in the IF.
Above just my humble, suppose through the great God has a better way, oh, I want to leave a message ~~!
Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.
How to Joptionpane the Showconfirmdialog dialog box button to set the monitor