title: New window in Processing
body: <p>Yesterday I found the following code for creating a second window in Processing</p>
  
  <pre><code>import javax.swing.JFrame;
  
  PFrame f;
  secondApplet s;
  
  void setup() {
  size(600, 340);
  
   }
  
   void draw() {
   background(255, 0, 0);
   fill(255);
   }     
  
   void mousePressed(){
  
   PFrame f = new PFrame();
   }
  
   public class secondApplet extends PApplet {
  
   public void setup() {
     size(600, 900);
      noLoop();
   }
   public void draw() {
     fill(0);
     ellipse(400, 60, 20, 20);
   }
   }
   public class PFrame extends JFrame {
     public PFrame() {
      setBounds(0, 0, 600, 340);
     s = new secondApplet();
     add(s);
      s.init();
      println("birh");
      show();
    }
  }
  </code></pre>
  
  <p>And edited...</p>
  
  <pre><code> void mousePressed(){
  
   PFrame f = new PFrame();
   }
  </code></pre>
  
  <p>Into:</p>
  
  <pre><code> if(mousePressed &amp;&amp; mouseX &gt; 1050 &amp;&amp; mouseX &lt; 1350 &amp;&amp; mouseY &gt; 700 &amp;&amp; mouseY &lt; &gt; 750) {
     f = new PFrame();
  
      }    
    }
  </code></pre>
  
  <p>It worked lovely, but since I downloaded and installed Processing III, I've got the following errors:</p>
  
  <ul>
  <li>The function <code>add()</code> expects parameters like <code>add(component)</code>.</li>
  <li>The function <code>init()</code> does not exist.</li>
  <li>The method <code>show()</code> from the type window is deprecated.</li>
  </ul>