3

I've got a vertically scrolling JPanel, on that JPanel are a couple of JScrollPanes, when the user scrolls down through the panel, if the users mouse goes over the JScrollPane they are no longer able to scroll the JPanel, the have to move their mouse off the JScrollPane and back onto the panel. It gets quite annoying after a while.

To this end is there any way to tell java to continue scrolling the parent JPanel unless the user clicks on the child JScrollPane and specifically tries to scroll it? enter image description here

Crizly
  • 971
  • 1
  • 12
  • 33
  • 1
    And what happens when they want to scroll the child scroll pane? How do you manage the differences between the case? – MadProgrammer Jun 10 '14 at 00:03
  • Possibly on click, i was hoping someone would have an idea how i could implement it, or even better if somehow it can detect that the user is scrolling the parent so it should not start scrolling the child (just looking for ideas atm) – Crizly Jun 10 '14 at 00:04
  • 1
    As I understand it, this functionality is likely controlled by the look and feel UI delegate – MadProgrammer Jun 10 '14 at 00:14
  • (+1) I got this problem once. but not able to solve. – Arijit Jun 10 '14 at 00:28

1 Answers1

0

I believe what you're looking for is JScrollPane#setWheelScrollingEnabled(boolean handleWheel)

MadProgrammer
  • 343,457
  • 22
  • 230
  • 366