Just thought somebody might be interested.

Thanks
Mark

protected JToolBar createToolBar() 
{
    JToolBar tb = new JToolBar();
    tb.putClientProperty("JToolBar.isRollover", Boolean.TRUE);
    JComboBox fontCombo = new JComboBox();
    JComboBox fontSizeCombo = new JComboBox();
    _fontSizeCombo = fontSizeCombo;

    ClassLoader cl = this.getClass().getClassLoader();

    //
    // FIX BEGIN: 
    // According to the JDK 1.3 docs: Class.getClass() can return null
    // to indicate the bootstrap class loader.
    if (cl == null)
    {
        cl = ClassLoader.getSystemClassLoader();
    }
    // 
    // FIX END:
    //

    URL newIconURL = cl.getResource("org/apache/log4j/viewer/" +
        "images/channelexplorer_new.gif");

    // The above line would generate a null pointer exception.


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to