Hi guys. I have a mouse event on my frame that enlarges the size of a JPanel that in on a JScrollPane. When the JPanel's size changes, the JScrollPane's scrollbars don't "refresh" ie. their max values don't get bigger, so you can't scroll to see rest of the entire bigger JPanel anymore.
Any ideas? I'm not asking to change the physical size of the scrollbars, I want to change the max values (at least that's what I think you'd call it) of the scrollbars, so you can scroll more.
Thanks.
I've tried using JScrollPane.get HorizontalScrol lbar().setMaxim um(), and setting it to the new width value of the JPanel after is has been enlarged, but that doesn't work... Am I missing a refresh call or something?
Any ideas? I'm not asking to change the physical size of the scrollbars, I want to change the max values (at least that's what I think you'd call it) of the scrollbars, so you can scroll more.
Thanks.
I've tried using JScrollPane.get HorizontalScrol lbar().setMaxim um(), and setting it to the new width value of the JPanel after is has been enlarged, but that doesn't work... Am I missing a refresh call or something?
Comment