Mouse motion listener for JTable with JScrollpane
Hi All,
I have added mouse motion listener for JTable which is added in JScrollPane. But if i move the mouse, over the vertical/horizontal scroll bars, mouse motion listener doesn't works.
So it it required to add mousemotionlistener for JTable, JScrollPane, JScrollBar and etc.
Thanks in advance.
Regards,
Tamizhan
# 2
Yes, The scroll bars are not part of the table.
But even i added the mouse motion listeneners to JScrollPane, it doesn't work for horizontal and vertical scroll bars. So i have added mouse listeners for horizontal and vertical scroll bars. But still mouse motion listener is not working for scroll bar buttons.
So is it required to all the components in JScrollPane? is there any other way to add mouse listener for all the child components in ScrollPane?
# 4
I am having one popup window which shows address information. This window contains JTable with JScrollPane and JButton components to show the details. While showing this information window, if the mouse cursor is over popupwindow, it should show the window otherwise it should hide the window after 30 seconds.
To achieve this, i have added mouse listener to JPanel, JTable, JButton and JScrollPane. so if the cursor is in any one of the component, it will not hide the window.
but for this i need to add listener to all the components in the JPanel. For JScrollPane i have to add horizontal, vertical and all the top corner buttons of Scroll bar.
Is this the only way to do this?