当在构造函数中未放置的方法中填充组合框时,组合框的箭头消失。
我尝试使用 invokeLater 方法,但没有成功。
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()
方法时发生了
关于java - JCombobox 箭头消失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51949890/