[please help me out here!!! Problem by drawing a path on JPanel]

Morn to all ;)

I am doing a small GUI using swing for my project now and having this problem:

I try to draw a path on JPanel, it can be like this

--

||

|path:|

| ***********|

||

--

and the path would be dynamically set if some external events come, then it should be an interactive component on the GUI, that's to say, it can be selected, and would blink if the mouse moves over it. (It will be extended to a city tourist assistant, which can represent some ways from one point to another ;))

But the problem is, I can't get through with the mouse move event related blinking...

My current implementation is, let the whole JPanel implement the Mouseistener or MouseMotionListener, and the click test is done with the path represented with a GeneralPath.

can anyone help me out here or give me some nice advices? like which Structure I should use to implement the path and the interaction? somehow I find this whole JPanel as Listener and path in GeneralPath not some right, but due to my very little Swing knowledge I can't come up with a good solution :P

Please help me out!!!

Thanks in advance!!!

[1192 byte] By [Kenkena] at [2007-11-27 2:07:15]
# 1
oh no, the layout is so bad but I didn't see it before I posted, sorry sorry about that.the path on the JPanel is simply a group of lines, actually a path, which can be used to represent a way from one point to another in a graph ;)
Kenkena at 2007-7-12 1:55:10 > top of Java-index,Security,Cryptography...
# 2
If your JPanel implements MouseListener, there is the mouseEntered() method which gets called when the mouse hovers over the component. Is that what you want?
CaptainMorgan08a at 2007-7-12 1:55:10 > top of Java-index,Security,Cryptography...