Cannot find method in inner class
<p>My code:</p>

<pre><code> public class MyPanel extends JPanel {
   private Thread spawnRnn = new Thread(new SpawnRnn());

   public MyPanel() {
     spawnRnn.start();
   }

   public class SpawnRnn implements Runnable {
     public void loadData() {}
     public void run() {}
   }
   public class MainRnn implements Runnable {
     public void run() {
       spawnRnn.loadData(); //&lt;--cannot find symbol. symbol: method loadData()
                            //location: variable spawnRnn of type Thread
     }
   }
}
</code></pre>

<p>I pointed place where error occurs. What is the reason and how to solve it?</p>
