Results 1 to 4 of 4
Thread: image display
- 04-07-2011, 07:23 AM #1
Member
- Join Date
- Mar 2011
- Posts
- 22
- Rep Power
- 0
image display
Hi frnds,
i M TRYING TO DISPLAY MULTIPLE IMAGES ON A SINGLE FRAME BUT I M UNABLE TO DO THAT.I AM ABLE TO DISPLAY ONLY A SINGLE IMAGE.CAN ANYONE HELP ME TO DO THIS?
I HAVE TRIED WITH THIS
public void paint(Graphics g)
{
String [] files ={ "D:\\rnd\\testImages\\test.jpg","D:\\rnd\\testImag es\\test1.jpg" };
BufferedImage[] images = new BufferedImage[files.length];
int i;
for(i = 0; i < files.length; i++)
{
try
{
images[i] = ImageIO.read(new File(files[i]));
System.out.println("i m here");
}
catch(Exception e)
{
System.out.println("Cant find file " +files[i]);
}
}
AffineTransform at = AffineTransform.getScaleInstance(currentRate, currentRate);
g2=(Graphics2D)g;
int i1;
for( i1=0; i1<images.length;i1++)
{
//g2=images.createGraphics();
g2.drawImage(images[i],at,null);
}
}
FURTHER I HAVE CREATED ANOTHER CLASS WHERE I HAVE JUST CREATED FRAME AND INVOKED ABOVE CONSTRUCTOR.PLZ DO REPLY AS SOON AS POSSIBLE
- 04-07-2011, 07:31 AM #2
WHAT'S WITH ALL THE CAPITAL LETTERS?
How to ask questions the smart way
DB
- 04-07-2011, 07:49 AM #3
Also, you already have a thread for the question.
to display image
Reporting this double post.
db
-
Double post locked. OP, please don't do this.
Similar Threads
-
to display image
By asmitarnd in forum AWT / SwingReplies: 6Last Post: 04-07-2011, 11:17 AM -
Display image from filesystem
By Pmarcoen in forum CLDC and MIDPReplies: 2Last Post: 08-31-2009, 11:00 AM -
how to read an image and display
By santhosh_el in forum AWT / SwingReplies: 2Last Post: 04-04-2009, 12:43 PM -
How to display image ?
By Birkoff in forum AWT / SwingReplies: 7Last Post: 06-09-2008, 07:58 AM


LinkBack URL
About LinkBacks

Bookmarks