Detect design time in NetBeans
Asked Answered
A

1

3

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

Apgar answered 10/11, 2009 at 4:39 Comment(0)
F
9

Try:

java.beans.Beans.isDesignTime()
Filbert answered 10/11, 2009 at 4:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.