JXLayer -- Issue with mouse event conversion
Hi, I have a JLabel that I am wrapping with a JXLayer. To get the label to scale, I alter the bounds of the layer and add the layer to a panel with a null layout manager. This works great. For example, if I add the layer to the panel and set the layer's bounds to be twice the width and twice the height of the label's preferred size, the label is scaled properly.
In addition to this, I want to allow the user to drag the label around the panel. I've added a mouse listener to the label and adjust the location of the layer as appropriate. Again, this works great. Except, if I scale the layer down to 50% of the width/height of the label's preferred size. When I do this, I start to get misconverted mouse events from PBTransform. That is, the location of the mouse event is incorrect.
Is there a solution for this problem?