title: Auto-complete decorator in JFrame
body: <p>I'm learning Swing and trying to make a text editor with autocomplete as an exercise. I use Netbeans. </p>
  
  <p>When I create JFrame and add a text area to it I end up with such auto-generated code:</p>
  
  <pre><code>package javaapplication5;
  public class NewJFrame extends javax.swing.JFrame {
      public NewJFrame() {
          initComponents();
      }
  
  @SuppressWarnings("unchecked")
  // &lt;editor-fold defaultstate="collapsed" desc="Generated Code"&gt;                          
  private void initComponents() {
  
      jScrollPane1 = new javax.swing.JScrollPane();
      jTextArea1 = new javax.swing.JTextArea();
  
      setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
  
      jTextArea1.setColumns(20);
      jTextArea1.setRows(5);
      jScrollPane1.setViewportView(jTextArea1);
  
      javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
      getContentPane().setLayout(layout);
      layout.setHorizontalGroup(
          layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 400, Short.MAX_VALUE)
      );
      layout.setVerticalGroup(
          layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
          .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 300, Short.MAX_VALUE)
      );
  
      pack();
  }// &lt;/editor-fold&gt;                        
  
  public static void main(String args[]) {
     java.awt.EventQueue.invokeLater(new Runnable() {
          public void run() {
              new NewJFrame().setVisible(true);
          }
      });
  }
  // Variables declaration - do not modify                     
  private javax.swing.JScrollPane jScrollPane1;
  private javax.swing.JTextArea jTextArea1;
  // End of variables declaration                   
  </code></pre>
  
  <p>}</p>
  
  <p>What I want to try is apply Autocomplete decorator described at </p>
  
  <pre><code>http://www.jdocs.com/swingx/1.0/org/jdesktop/swingx/autocomplete/AutoCompleteDecorator.html
  </code></pre>
  
  <p>When I try to do </p>
  
  <pre><code>List list = Arrays.asList("A", "B", "C");
  AutoCompleteDecorator.decorate(jTextArea1, list);
  </code></pre>
  
  <p>it results into:</p>
  
  <pre><code>error: &lt;identifier&gt; expected
  AutoCompleteDecorator.decorate(jTextArea1, list);
  </code></pre>
  
  <p>What's wrong with the code?</p>