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

Luke Quinane
  • 16,447
  • 13
  • 69
  • 88

1 Answers1

9

Try:

java.beans.Beans.isDesignTime()
TofuBeer
  • 60,850
  • 18
  • 118
  • 163