Hello all,
First of all i would like to say i have googled my problem many times, i can only apologise if the solution is simple, and maybe it is if you know what your looking for, but i am however stuck.
My problem is this, i am working on a world clock in java. I have a big picture (displayed in a JLabel) which shows all the 24 different time zones, now what i want to happen is, add a mouselistener so that when the mouse cursor goes over a specific time zone an new image is shown (one thats exactly the same size as that time zone, only darker).
Now i have the big picture,and the 24 other darker pictures, and there all added and i know they there, but my problem lies in getting them to appear over the big image, the mouselistener wont pick up the smaller images sitting behind the big image, so what can i do?
I tried making the smaller darker images transparent using the setOpague code, but that didn't work, using setVisible, but that did work, but again the mouselistener wont pick it up.
to be a little clearer i was writing code like this
CODE
public void mouseEntered(MouseEvent e){
if(e.getComponent()==p1)
p1.setVisible(true);
but the mouselistener wont pick up the JLabel p1, as it's sitting behind the big image.
what i think is the easiest option is if i can get the whole image transparent, so that the mouselistener will pick it up, but you wont actually see it there, until i want it to be there.
god i really hope that all makes sense and you can see my dilema, please be kind, i am trying to learn.
ask if you need more info, or more code to all my program
Thanks in advance
Jason