我已經下載了Vaadin色器插件嘗試一下,還有如果我克利克在ColorPicker「按鈕」一個小問題兩次,我得到一個IllegalArgumentException:Vaadin顏色拾取拋出:IllegalArgumentException
異常
java.lang.IllegalArgumentException: Window was already added to application - it can not be added to another window also.
at com.vaadin.ui.Window.addWindow(Window.java:1447)
at com.vaadin.addon.colorpicker.ColorPicker.changeVariables(Unknown Source)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariableBurst(AbstractCommunicationManager.java:1299)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.handleVariables(AbstractCommunicationManager.java:1219)
at com.vaadin.terminal.gwt.server.AbstractCommunicationManager.doHandleUidlRequest(AbstractCommunicationManager.java:735)
另一個問題:
我想要的顏色拾取窗口,如果我在一個菜單類似,如果我點擊「設置顏色」我得到的顏色拾取窗口單擊一個項目彈出。其挺難放在我的GUI按鈕:P
編輯:
林添加顏色拾取這樣的:
colorPicker = new ColorPicker();
colorPicker.setButtonCaption("Set Color");
colorPicker.setRGBVisibility(false);
colorPicker.setHSVVisibility(false);
colorPicker.setHistoryVisibility(false);
colorPicker.addListener(this);
window.addComponent(colorPicker);
你能後你是如何在你的代碼添加顏色選擇器? – 2012-01-30 17:44:03
@Terrell Plotzki編輯了這個問題。 – Kiesa 2012-01-31 07:44:15