how add icon for RibbonApplicationMenu?
<p>I have an application in Java and I want it to have a RibbonApplicationMenu with icon.</p>

<p>I already have the RibbonApplicationMenu but with no icon. I was wondering if it is possible to add an Icon to the RibbonApplicationMenu?</p>

<p>And also I found the following code, everytime I used the code below, it gives me exception</p>

<p>public static ResizableIcon getResizableIconFromResource(String resource) {</p>

<pre><code>    return ImageWrapperResizableIcon.getIcon(MainFrame.class.getClassLoader().getResource(resource), new Dimension(48, 48));
}
</code></pre>

<p>Exception:</p>

<p>Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
        at org.pushingpixels.flamingo.api.common.icon.ImageWrapperResizableIcon.getIcon(ImageWrapperResizableIcon.java:71)
        at com.scamex.app.MainFrame.getResizableIconFromResource(MainFrame.java:187)
        at com.scamex.app.MainFrame$1.run(MainFrame.java:86)
        at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:251)
        at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:705)
        at java.awt.EventQueue.access$000(EventQueue.java:101)
        at java.awt.EventQueue$3.run(EventQueue.java:666)
        at java.awt.EventQueue$3.run(EventQueue.java:664)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:675)
        at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:211)
        at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:90)</p>
