image listners

i have two images

one is opaque and

other is transparent with visible borders

using key listener i have moved the transparent image while pressing right left down and up .

while making the transparent image move on the opaque image iwant the
key listener to be shifted to the opaque image and when i press right left down and up the opaque image should move rather than the transparent one