JCombobox arrow disappears

byte :

When the fill combobox in a method which is not placed in the constructor, the arrow of combobox disappears.

I tried with the invokeLater method, but it did not work.

image

private void fillProduct(){
    this.VALID_FOR_PRODUCT.removeAllItems();
    this.VALID_FOR_PRODUCT.addItem(new JChooseItem("ALL", "Any"));
    for(Product product : Product.values()){
        this.VALID_FOR_PRODUCT.addItem(new JChooseItem(product.getName(), langHelper.getTrans(product.getTranslationKey())));
    }
}
Hrvoje :

I had the same issue, it happened when I used method removeAllComponents() method instead of removeAll() method

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=81425&siteId=1