Is it possible to tie the Graphic which I drawn with action listener : <p>I drawn some rectangle, using Graphic g. </p>

<p>Is it possible that I use the rectangle I drawn and tie it with some code. So that when I click on that rectangle. Some action happen. </p>
