Detect design time in NetBeans

1.2k Views Asked by At

When using the Swing graphical editor in NetBeans is it possible for a custom component to detect that it's design time? E.g.

public CustomComponent() {
    initComponents();

    if (!isDesignTime()) {
        someIcon = IconFactory.loadIcon("icons/SomeIcon.png");
    }
}

Basically I'm after something like .net's Component.DesignMode

1

There are 1 best solutions below

0
On BEST ANSWER

Try:

java.beans.Beans.isDesignTime()