Can't set icon for PasteAction

"mdaley" <[email protected]>
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
Hello,

I am trying to change the icons for a netbeans platform application.  I can happily change the icon programmatically for things like CopyAction, CutAction etc... just by doing this:

public class CopyAction extends org.openide.actions.CopyAction {
    
    @Override
    protected String iconResource() {
        return ResourceUtilities.getInstance().themedResourcesPath("copy.png"); // NOI18N
    }   
}

I want to do the same with PasteAction but the bloody thing is a final class!  This is rather annoying.  

Please could someone suggest a way of being able to control the icon.  The problem I get is that whatever I try, the lower layers of the system decide to use the icon path that is specified in PasteAction, namely:

    protected @Override String iconResource() {
        return "org/openide/resources/actions/paste.gif"; // NOI18N
    }

Pleae help!! :-)

Kind regards
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.