protected void edit() { makeIconEditorFrame(this, "Icon", false, null); NamedIcon icon = new NamedIcon(_namedIcon); _iconEditor.setIcon(0, "plainIcon", icon); _iconEditor.makeIconPanel(false); ActionListener addIconAction = new ActionListener() { public void actionPerformed(ActionEvent a) { editIcon(); } }; _iconEditor.complete(addIconAction, true, false, true); }
protected void editIcon() { String url = _iconEditor.getIcon("plainIcon").getURL(); _namedIcon = NamedIcon.getIconByName(url); super.setIcon(_namedIcon); updateSize(); _iconEditorFrame.dispose(); _iconEditorFrame = null; _iconEditor = null; invalidate(); }