title: NoClassDefFoundError on validation API used in desktop app
body: <p>I have created a form in Java Swing and want to validate them with an API.
  I have included the validation API but when I want to run this class there is an error showing like this:</p>
  
  <pre><code>Exception in thread "main" java.lang.NoClassDefFoundError: org/openide/util/Lookup
      at org.netbeans.validation.api.ui.swing.SwingComponentDecorationFactory.getDefault(SwingComponentDecorationFactory.java:154)
      at org.netbeans.validation.api.ui.swing.SwingValidationGroup.&lt;init&gt;(SwingValidationGroup.java:82)
      at org.netbeans.validation.api.ui.swing.SwingValidationGroup.create(SwingValidationGroup.java:87)
      at org.netbeans.validation.api.ui.swing.ValidationPanel.&lt;init&gt;(ValidationPanel.java:95)
      at org.netbeans.validation.api.ui.swing.ValidationPanel.&lt;init&gt;(ValidationPanel.java:109)
      at Main.main(Main.java:23)
  Caused by: java.lang.ClassNotFoundException: org.openide.util.Lookup
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 6 more
  </code></pre>
  
  <p>The jar file I included is (<code>ValidationAPI.jar</code>)
  so I don't know what is the problem. </p>
  
  <p>Does anyone know how to solve this?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>import javax.swing.JLabel;
  import javax.swing.JPanel;
  import javax.swing.JTextField;
  
  import org.netbeans.validation.api.builtin.stringvalidation.StringValidators;
  import org.netbeans.validation.api.ui.ValidationGroup;
  import org.netbeans.validation.api.ui.swing.ValidationPanel;
  
  public class Main{
  
  @SuppressWarnings("unchecked")
  public static void main(String[] args) {
  
      JPanel inner = new JPanel();
      JLabel lbl = new JLabel("Enter a URL");
      JTextField f = new JTextField();
      f.setColumns(40);
      f.setName("URL");
      inner.add(lbl);
      inner.add(f);
  
  
     ValidationPanel panel = new ValidationPanel();
      panel.setInnerComponent(inner);
      ValidationGroup group = panel.getValidationGroup();
  //    
      group.add(f, StringValidators.REQUIRE_NON_EMPTY_STRING,
              StringValidators.NO_WHITESPACE);
  
      if (panel.showOkCancelDialog("URL")) {
  
        System.out.println("User clicked OK.  URL is " + f.getText());
       System.exit(0);
  
      }
      else {
        System.err.println("User clicked cancel.");
        System.exit(1);
      }
    }
  }
  </code></pre>