my dog learned polymorphism*
The moose likes Swing / AWT / SWT and the fly likes View Multiple images in a single window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "View Multiple images in a single window" Watch "View Multiple images in a single window" New topic
Author

View Multiple images in a single window

Souvik Das
Greenhorn

Joined: Oct 11, 2007
Posts: 15
Hi,
Does anybody know how to open multiple images in a single window ? I want a scrollbar with this to view multiple images.It would be helpful if anybody share a code regarding this.
Thanks in advance.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10172
    
    8

Originally posted by Souvik Das:
Hi,
Does anybody know how to open multiple images in a single window ? I want a scrollbar with this to view multiple images.It would be helpful if anybody share a code regarding this.
Thanks in advance.


Wrap the images inside JLabel. Add these labels to the panel with your favorite layout. Add the panel to the base container after wrapping it inside a JScrollPane.


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
G Estes
Ranch Hand

Joined: Oct 22, 2002
Posts: 62
or create a JScrollPane, set it as horizontal or vertical and add one label for each image you are displaying. The image will be on each label.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

Isn't that exactly what Maneesh said?


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: View Multiple images in a single window
 
Similar Threads
inheritance
inheritance
frames and pageContext
HTML user guide question
Modifying the ImagePicker Controller