Search code examples
javaswingjdatechooserjcalendar

How can i hide or close popupmenu JDateChooser?


I use JDateChooser and some combobox in one frame. When i open popupcalendar in JDateChooser and do mouse click outside, this popupmenu close.

Problem: When i open this calendar and then click to any combobox, calendar popupmenu does not close. Why does it heppend and how i can close or hide it in code.

I have try it like this popup.setVisible(false), but it does not work. if i try like
popup.hide() popupmenu will never close.


Solution

  • try isShowingPopup = false;

     private void PopMenuFocusLost(java.awt.event.FocusEvent evt) {                                           
    
    
    isShowingPopup = false;
        }