I have a JPanel inside a JScrollPane, and that JPanel must be able to change width when the users moves the mouse wheel. I wrote the event listener for the mouse wheel, which works, but the JScrollPane seems to force a different (constant) size on the inner JPanel. I found a ScrollablePanel class online, but it seems to have the same problem. How can I fix it?
Thanks :)