void () { if (myEditable && isEnabled()) { RelativePoint location = new RelativePoint(this, new Point(getWidth() / 2, getHeight())); ColorChooserService.getInstance().showPopup(null, myColor, new ColorListener() { @Override public void colorChanged(Color color, Object source) { setSelectedColor(color); if (!myListeners.isEmpty() && (myEvent == null)) { try { myEvent = new ActionEvent(this, ActionEvent.ACTION_PERFORMED, "colorPanelChanged"); for (ActionListener listener : myListeners) { listener.actionPerformed(myEvent); } } finally { myEvent = null; } } } }, location, mySupportTransparency); } }