I created a JLabel
as a picture and added it to JScrollPane
and then to my JFrame
.
Next thing I overriden paint()
method in my JFrame
and used drawLine()
method to draw 4 lines (they look like a frame).
Now when I'm scrolling, my lines disappear and they don't repaint()
. Only when I made action such as minimalize, maximalize etc i can see them.
How to force to repaint()
after using ScrollPane
?