java_give_question_to_me
<p>I have an aplication where is picture with SIN, COS..
TextArea1 will tell somebody: "Click in picture where SIN"
if user do this, textArea2 tell him: "It is corect"</p>

<p>After that, textArea1.append "Click in picture where COS"
-but program is still waiting for clicking to SIN :(
Can you help me and give a little advice to me please?</p>

<p>There is some code:</p>

<pre><code>private class KlikaniMysi implements MouseListener {
    @Override
    public void mouseClicked(MouseEvent e) {
        System.out.println(e.getX() + "  " + e.getY());
        //for finding coordinates (by console)
        //textArea2 = "try" at start !!
        //textArea1 = "Find SIN" at start !!!!!!!!
        if(textArea2.equals("try")){
            if( (((e.getX()) &gt; 420)&amp;&amp;((e.getX()) &lt; 580)) &amp;&amp; ( ((e.getY()) &gt; 164)&amp;&amp;((e.getY()) &lt; 178) )){
                textArea2.setText("");
                textArea2.append("RIGHT1");
                textArea1.append("Find COS"); //!!!! work!!
                //How to stop the IF cycle here and run class KlikaniMysi (mouselistener) again ?
            }
            else{
                textArea1.setText("");  
                textArea1.append("try again");
            }
        }else{
            if( (((e.getX()) &gt; 586)&amp;&amp;((e.getX()) &lt; 594)) &amp;&amp; ( ((e.getY()) &gt; 174)&amp;&amp;((e.getY()) &lt; 282) )){
                //This isnt nice, but I dont know how to expres range better.                        
                textArea1.setText("");
                textArea2.append("Right2");
                textArea1.append("Find  TAN");
            }
            else{
                vystup.setText("");  
                textArea1.append("Try again");
            }
        }
    }
</code></pre>
