In this Jpanel I draw some shapes. The problem I have is when I scroll up and down. The drawing on the Jpanel appears cut. So I want to redraw the Jpanel every time I drag the scrollbar or click the direction arrows.
- good idea in the case that you repainting concrete Rectangle, Dimension for this Rectangle returns JViewport
I have a Jscrollpane with a Jpanel inside. In this Jpanel I draw some shapes. The problem I have is when I scroll up and down.
- use AdjustmentListener added to JScrollBar (derived directly from JScrollPane or as local variable)