简体   繁体   中英

JCombobox arrow disappears

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.

图片

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())));
    }
}

我有同样的问题,它发生在我使用方法removeAllComponents()方法而不是removeAll()方法

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM