PDA

Click to See Complete Forum and Search --> : how would i do this?


nabeels786
Mar 25th, 2002, 12:08 PM
im using the java advanced imageing library and...

i have a panel with an image on it...when the panel is click i want it to flip around and display another image...how would i do something like that?

thanks
:)

Dillinger4
Mar 25th, 2002, 11:13 PM
:D I don't know how you could make it look like it was flipping around but for the display part i guess you could just test for a mouse event and load an alternate image when that event is fired off.

nabeels786
Mar 26th, 2002, 09:03 AM
i got it to flip, but now i just gotta make it sorta rotate slowly



private void updateWarp() {
PerspectiveTransform test;
if(flip==false){ //flip horizontal
test = PerspectiveTransform.getQuadToQuad(
(float) width,(float) 0,
(float) 0, (float) 0,
(float) 0, (float) height,
(float) width,(float) height,
(float)0,(float) 0,
(float)width,(float) 0,
(float)width,(float) height,
(float)0, (float) height);

flip=true;
}else{
test = PerspectiveTransform.getQuadToQuad(
(float) 0,(float) 0,
(float) width, (float) 0,
(float) width, (float) height,
(float) 0,(float) height,
(float)0,(float) 0,
(float)width,(float) 0,
(float)width,(float) height,
(float)0, (float) height);

flip=false;
}