Skip to content

Setting icons on XTabbedPane doesn't seem to work #1

@dbrgn

Description

@dbrgn

This works:

<label id="headericon" icon="icons/books_medium.png" />

This does not work:

<tabbedPane id="tabbedPane" constraints="BorderLayout.CENTER" tabPlacement="TOP" icons="icons/books_medium.png,icons/books_medium.png,icons/books_medium.png">

There are 3 vbox elements contained in the tabbedPane.

When setting the icons on the element directly using setIcons, an exception is thrown.

tabbedPane.setIcons("icons/books_medium.png,icons/books_medium.png,icons/books_medium.png");

Exception in thread "main" java.lang.NullPointerException
    at org.swixml.converters.ImageIconConverter.conv(ImageIconConverter.java:99)
    at org.swixml.XTabbedPane.setIcons(XTabbedPane.java:216)
    at application.ui.BookMaster.onInitialize(BookMaster.java:115)
    at application.ui.BookMaster.<init>(BookMaster.java:94)
    at application.InitApp.main(InitApp.java:16)

When that happens (ImageIconConverter.java line 99) the localizer element is null. That might be the problem (or a symptom of the real problem).

I'm using the current SwiXML 2 downloaded from your website.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions