I have a JTable inside a JPanel. I can scroll up and down the JPanel using the mouse’s scroll wheel, but when my mouse is hovering over the JTable, I have to move it out of the table to scroll back up the JPanel using the scroll wheel. Is there a way I can scroll up and down the JPanel using the scroll wheel if the mouse is hovering over the JTable?
I have a JTable inside a JPanel . I can scroll up and down
Share
I took Xeon’s advice in the comment above and implemented a mouse wheel listener that forwards mouse wheel events to the parent component. See the code below.