Avatar of MuhammadAdil
MuhammadAdilFlag for Pakistan

asked on 

Display List of images using ScrollingImagePanel

Hi, following method is called by clicking Next image Button
problem is that he is displaying first image with scrollbar, but second image display without scroll bar and same as third and so on.  
 public void displayImage2(PlanarImage ri)
    {
       
        panel = new ScrollingImagePanel(ri,500, 300);
        getContentPane().add(panel);
        panel.setBounds(50, 300, 500, 300);
    }
Java

Avatar of undefined
Last Comment
Gyftus
Avatar of Mick Barry
Mick Barry
Flag of Australia image

how are you changing the image being displayed?
try (re)validating/repainting the panel after changing the image.
Avatar of arun_kuttz
arun_kuttz

try inserting a

getContentPane().repaint();

within the loop

-KuTtZ
Avatar of Giant2
Giant2

I see the same bounds:
500, 300

Try to use different, the scroll bars will appears.

Bye, Giant.
ASKER CERTIFIED SOLUTION
Avatar of Gyftus
Gyftus

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of Gyftus
Gyftus

Thank you for the points, I hope you are solved the problem
Java
Java

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.

102K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo