Skip to content
Advertisement

How to terminate a JOptionPane ConfirmDialog from an actionListener

I use this line to show my ConfirmDialog

JavaScript

In that ConfirmDialog I have a button which calls a server using a actionListener, when the connection is broken I have a check which terminates the function. But i can for the love of god not figure out how to terminate the ConfirmDialog at the same time.

How can I solve this problem while still using ConfirmDialog?

Advertisement

Answer

You could use setVisible(false) or dispose() method

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement