currently I am working on an application in which I have small JPanels that represent some Items and I can move them by clicking on anyone of them inside another JPanel I called it sessionPanel that holds all the others, but when I add setToolTipText for the movable jpanels
I can not move them anymore
does anyone can give me a reasonable explanation
When you use setToolTipText() a MouseListener is added to the component so tool tip processing can be implemented. I would guess that this mouse listener is receiving the mouse event and consuming them so they don't get passed to your mouse listener.
Try changing you code to look something like:
Swing dispatches the event in reverser order that the mouse listener is added to the component so you listener should be executed first.