JFrame is not removed from the taskbar
问题 This question is related to my previous question Showing JDialog on taskbar does not look good. I have modified my code so that the dialog is displayed correctly but now the problem is that the button does not disappear from the taskbar when the dialog is closed. So the application runs, a dialog is displayed and a button is created in the taskbar for it. When I choose YES or NO, the dialog is closed but the button remains in the taskbar. For this reason, buttons add up in the taskbar each