Invoking classes in Java
<p>I want to write three classes in Java where when a button is clicked in class A and another button is clicked in class B, the two events combined creates an instance of class C. How do I go about this?</p>

<p><strong>(Update from comments:)</strong></p>

<p>Below is the event code. </p>

<pre><code>// There is a text area showing when it is clicked and when it 
// gets a response back from the thirdclass
...
buttonpanel = new JPanel(); 
getItButton = new JButton("Call ThirdClass"); 
getItButton.addActionListener (new ActionListener() { 
    public void actionPerformed (ActionEvent evt) { 
        textarea.append("Calling thirdclass...\n"); 
        String result = thirdclass.fetch_message(); 
        textarea.append(" Result = " + result + "\n\n"); 
    } 
}); 
</code></pre>
