Given that code the only thing I can think of is when you click the mouse, to get the coordinates of the mouse cursor and to see if those coordinates are inside in any of those images.
Also after seeing your code, and I am not saying that it is wrong, but you'd better try to read some decent tutorials on how to create GUI using the javax.swing.
Try the sun tutorials, or search the net
For Each ctrl As Control In Me.Controls("pnlMainPanel").Controls
If ctrl.GetType Is GetType(System.Windows.Forms.Panel) Then
For Each subCtrl As Control In ctrl.Controls
If subCtrl.GetType Is GetType(System.Windows.Forms.TextBox) Then
If subCtrl.GetType Is ...