amba2004
asked on
How do I add a label
How do I add a label to a canvas and move the label with the mouse on every mouseDragged event.
label.setPosition(me.getX( ), me.getY()); // 'me' is the MouseEvent
Use a null layout, and set the label location in your mouseDragged.
label.setLocation(event.ge tX(), event.getY());
label.setLocation(event.ge
>How do I add a label to a canvas
You *cannot* add Label to a Canvas since Canvas is not a Container.
You *cannot* add Label to a Canvas since Canvas is not a Container.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
:)