使用 material 图标作为 comboImage 常量
Using material icon as comboImage constant
我正在尝试使用以下代码将 material 图标更改为 comboImage,但它不起作用:
Hashtable h = new Hashtable();
h.put("comboImage", FontImage.createMaterial(FontImage.MATERIAL_ARROW_DROP_DOWN, "TitleCommand", 2F));
UIManager.getInstance().addThemeProps(h);
Display.getInstance().getCurrent().refreshTheme();
如何在代码中更改主题常量?
提前致谢。
改为这样做:
((DefaultLookAndFeel) UIManager.getInstance().getLookAndFeel()).setComboBoxImage(FontImage.createMaterial(FontImage.MATERIAL_ARROW_DROP_DOWN, "TitleCommand", 2F));
我正在尝试使用以下代码将 material 图标更改为 comboImage,但它不起作用:
Hashtable h = new Hashtable();
h.put("comboImage", FontImage.createMaterial(FontImage.MATERIAL_ARROW_DROP_DOWN, "TitleCommand", 2F));
UIManager.getInstance().addThemeProps(h);
Display.getInstance().getCurrent().refreshTheme();
如何在代码中更改主题常量?
提前致谢。
改为这样做:
((DefaultLookAndFeel) UIManager.getInstance().getLookAndFeel()).setComboBoxImage(FontImage.createMaterial(FontImage.MATERIAL_ARROW_DROP_DOWN, "TitleCommand", 2F));