title: global variable in GUI netbeans
body: <p>I want to declare a global variable in netbeans GUI. Where and how do I declare it? I tried declaring it the public class</p>
  
  <pre><code>public class Area extends javax.swing.JFrame {
  
      /**
       * Creates new form Area
       */
      public Area() {
          initComponents();
          int ch;
      }
  </code></pre>
  
  <p>But on intializing it later it says no variable recognized.</p>