title: When I run the Codename One HelloWorld Java Program from the Codename One HelloWorld Tutorial, I get an error
body: <p>When I run the Codename One HelloWorld Java Program from the Codename One HelloWorld Tutorial video, I get this error:
  java: cannot find symbol
  symbol:   class Button
  location: class com.acmecorp.appname.AppName</p>
  <p>I think I'm missing an import for class Button.  How do I add the import statement for class Button so that the compilation won't have this error?</p>
  <p>Here is my source code:</p>
  <pre><code>package com.acmecorp.appname;
  
  
  import static com.codename1.ui.CN.*;
  import com.codename1.ui.Display;
  import com.codename1.ui.Form;
  import com.codename1.ui.Dialog;
  import com.codename1.ui.Label;
  import com.codename1.ui.plaf.UIManager;
  import com.codename1.ui.util.Resources;
  import com.codename1.io.Log;
  import com.codename1.ui.Toolbar;
  import java.io.IOException;
  import com.codename1.ui.layouts.BoxLayout;
  import com.codename1.io.NetworkEvent;
  
  /**
   * This file was generated by &lt;a href=&quot;https://www.codenameone.com/&quot;&gt;Codename One&lt;/a&gt; for the purpose 
   * of building native mobile applications using Java.
   */
  public class AppName {
  
      private Form current;
      private Resources theme;
  
      public void init(Object context) {
          // use two network threads instead of one
          updateNetworkThreadCount(2);
  
          theme = UIManager.initFirstTheme(&quot;/theme&quot;);
  
          // Enable Toolbar on all Forms by default
          Toolbar.setGlobalToolbar(true);
  
          // Pro only feature
          Log.bindCrashProtection(true);
  
          addNetworkErrorListener(err -&gt; {
              // prevent the event from propagating
              err.consume();
              if(err.getError() != null) {
                  Log.e(err.getError());
              }
              Log.sendLogAsync();
              Dialog.show(&quot;Connection Error&quot;, &quot;There was a networking error in the connection to &quot; + err.getConnectionRequest().getUrl(), &quot;OK&quot;, null);
          });        
      }
      
      public void start() {
          if(current != null){
              current.show();
              return;
          }
          Form hi = new Form(&quot;Hi World&quot;, BoxLayout.y());
          hi.add(new Label(&quot;Hi World&quot;));
          Button b = new Button(&quot;Show Dialog&quot;);
          hi.add(b);
          b.addActionListener((e) -&gt; Dialog.show(&quot;Dialog Title&quot;, &quot;Hi&quot;, &quot;OK&quot;, null));
          hi.show();
      }
  
      public void stop() {
          current = getCurrentForm();
          if(current instanceof Dialog) {
              ((Dialog)current).dispose();
              current = getCurrentForm();
          }
      }
      
      public void destroy() {
      }
  
  }
  </code></pre>