Get the source when mouseclicked

I have a GUI with 36 different JTexFields. They are stored in an array JTextField[].

When I add them to the pane I just use for loop up 36 and add them.

Moving on I have implemented a mouselistener and when I press the right button(on mouse) I want to get the current JTextField[]. Fexample if clicked on the JTexField[2] I need to get number 2.

I have tried with e.getComponent() but I not sure how to cast it to something readable

[458 byte] By [PhpDudea] at [2007-11-27 1:58:29]
# 1
for (int i=0;i<array.length;i++)if (e.getSource()==array[i]) //do something>
J@A@V@Aa at 2007-7-12 1:35:14 > top of Java-index,Desktop,Core GUI APIs...
# 2
Why did you repost, you where given the answer in your original posting?
camickra at 2007-7-12 1:35:14 > top of Java-index,Desktop,Core GUI APIs...
# 3
Sorry, I was trying to move the post overhere, but found that there was not function for that. I did not see your answer, I only saw the part where it said that I should not post in that forum, before I post it here. Then it was to late Sorry. The other post can be deleted.
PhpDudea at 2007-7-12 1:35:14 > top of Java-index,Desktop,Core GUI APIs...