开发者

Detect design time in NetBeans

开发者 https://www.devze.com 2022-12-11 12:55 出处:网络
When using the Swing graphical editor in NetBeans is it possible for a custom component to detect that it\'s design time? E.g.

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 Compo开发者_开发技巧nent.DesignMode


Try:

java.beans.Beans.isDesignTime()
0

精彩评论

暂无评论...
验证码 换一张
取 消