void () { myColorPicker.appendRecentColor(); myColorPicker.saveRecentColors(); if (myListeners != null && myListeners.isEmpty()) { String color = StringUtil.toUpperCase(ColorUtil.toHex(myColorPicker.myColor)); CopyPasteManager.getInstance().setContents(new StringSelection(color)); } super.doOKAction(); }