Win a copy of Java Concurrency Live Lessons this week in the Threads forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem when displaying images in JScrollPane.  RSS feed

 
Wael Atef
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
i have the following problem when i display multiple images in a JScrollPane and then try to scroll them.i have used a large JPanel with flow layout and then for every image i have i created a small JPanel and draw the image over this small JPanel using the Graphics method drawImage(). and finally added all these small JPanels to the large JPanel and put this panel in the scrollpane. when i'm trying to scroll down the images have trailing and the view is distorted. i don't know from where this problem come. Any help plz.
 
Abhik Sarkar
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Wael,
Maybe you could try using multiple JLabel's with JImageIcon's in them, instead of what you are trying to do (unless there is some particular reason for your trying this approach).
Hope this helps.
Abhik.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!