1
我正在開發我的第一個應用程序在vaadin,我不能改變我的按鈕的顏色(希望他們黑人)。我正在使用從馴鹿身上繼承的自定義主題。如何更改按鈕的顏色?
我嘗試了這種方式:
buttonSetting = new Button();
buttonSetting.setIcon(new ThemeResource("images/icons/16px/setting.png"));
buttonSetting.addStyleName(Reindeer.BUTTON_SMALL);
buttonSetting.addStyleName(Reindeer.LAYOUT_BLACK);
但不工作,我該怎麼辦?
另請參閱:http://stackoverflow.com/questions/12563322/java-apple-default-look-and-feel-how-to-set-color-of-a-button – Gianmarco
Chec this http:// stackoverflow.com/questions/15393385/java-how-to-changing-text-color-on-button –
嘗試使用 'buttonSetting.setStyleName(Reindeer.LAYOUT_BLACK);' 'buttonSetting.addStyleName(Reindeer.BUTTON_SMALL);' –