-
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
-
WHAT'S WITH ALL THE CAPITAL LETTERS?
How to ask questions the smart way
DB
-
Also, you already have a thread for the question.
http://www.java-forums.org/awt-swing...lay-image.html
Reporting this double post.
db
-
Double post locked. OP, please don't do this.