• Post Reply Bookmark Topic Watch Topic
  • New Topic

ScrollBar problem in painting

 
satya sahu
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I am using a jpanel, which is added to a scroll pane which in turn added to jDialog. In the jpanel i am drawing some 441 squares and some texts. Everything is fine. But the scrolling is extreamly slow. Is there any way to make the scrolling normal. Please help me soon. It is very urgent.
Thanking all.
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Change the paint routine to paint only the area that is currently visible in the scrollpane... painting areas that are not visible is just a waste of time...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!