title: Why Java inner classes require "final" outer instance variables?
body: <pre><code>final JTextField jtfContent = new JTextField();
  btnOK.addActionListener(new java.awt.event.ActionListener(){
      public void actionPerformed(java.awt.event.ActionEvent event){
          jtfContent.setText("I am OK");
      }
  } );
  </code></pre>
  
  <p>If I omit <code>final</code>, I see the error "<em>Cannot refer to a non-final variable jtfContent inside an inner class defined in a different method</em>".</p>
  
  <p>Why must an anonymous inner class require the outer classes instance variable to be final in order to access it?</p>