I have an 10 x 10 array of JButtons in my project. I was just wondering how do i find out which button the mouse cursor is over at any given time?
I have tried adding the following to the buttons:
b.addMouseMotionListener(new MouseMovingHandler());
b.addMouseListener(new MouseHandler());