How to share objects among threads?
<p>there are several similar questions . But my question is basic and not specific to a problem . I want a basic code example of <strong>how</strong> to do that . Here is the code I am working on</p>

<pre><code>         Controller c = new Controller(....) ;
         if(.... ) //manager
    {
        if (jRadioButton1.isSelected())
        {
          java.awt.EventQueue.invokeLater(new Runnable() {
       public void run() {
            new MyGUI().setVisible(true);//I want to pass object c to MyGUI Thread
        }
    });
        }
</code></pre>
