So to briefly explain my situation, I'm creating a DateChooser inside of a JComboBox.

Most of them have these stupid little arrows to skip around through the years and months, like this one: http://undocumentedmatlab.com/images/JIDE_DateChooserPanel.png
But I want a drop-down list of the 12 months instead of arrows.

So, I have my JComboBox which has a custom JPopupMenu that contains the DateChooser, the problem is the DateChooser contains another JComboBox to select the months. Everytime I click on the month JComboBox-it gains focus.. then the parent JComboBox loses focus, hides, and then the child JComboBox loses focus but is still visible.

Is there any way to stop the JPopupMenu from losing focus and making everything act retarded?

In the ActionListener of the second JComboBox you can

fatherCombo.requestFocus();
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.