JPanel overlay which grabs all MouseEvents
Hi all.
I'm getting stuck with an OverlayLayout and a transparent JPanel.
What I have is a JPanel with several components on it (Textfields, Comboboxes, ..)
In the running application I need to be able to re-arrange the components using
drag & drop but this feature can be disabled so the UI behaves like every other you know.
(You can think of this as a minimalistic GUI designer).
My approach was to place another (transparent) JPanel on top of it using OverlayLayout to
be able to drag ghost copies of my components around with the mouse.
This panel can be switched invisible so dragging is disabled.
This works for components which do not react on mouse events for themselves
(JLabels, ..) but not for textfields.
What I would need is a transparent layer which is able to graball MouseEvents so the
components on the underlying panel will not receive them (textfields don't get the focus, buttons don't get clicked, ...).
Any help really appreciated.
Kind regards
Carsten

