I have a custom JComboBox that I have populated with JCheckBoxes, and the combo box is used as an editor within a table.
I am trying to make it so that when the user selects an item, the popup menu is not dismissed. The only time it should be dismissed is when it looses focus.
I have attempted this by overriding the setPopupVisible method, but it is not working.
@Override
public void setPopupVisible(boolean v) {
if (v && !this.isPopupVisible()) {
super.setPopupVisible(true);
} else if (requiresDismissal) {
requiresDismissal = false;
super.setPopupVisible(false);
} else {
requiresDismissal = false;
}
}
requiresDismissal is a boolean value set to true whenever one of the objects within the popup menu is clicked. I tested further by attempting to disable the ability to dismiss the popupmenu entirely, but nothing I try seems to work.
Thank you in advance for the help!
