Hi,
I’m trying to make a JFrame that consists of 2 JPanels. The left panel has a list of buttons the user can press, and the right panel is a canvas for drawing graphics. Let’s say one of the buttons on the left panel is “place a square” such that if I press the button, I should be able to then move my mouse over to the canvas panel, and the moment my mouse enters the canvas panel region, a pre-drawn square will follow my mouse around. I can then move my mouse and left-click to “drop” the square on the location of the panel I want.
I know there are mouse motion listeners available, but I was wondering if anyone had any tips, advice, or links to demos with source code that implements this functionality.
Thanks!
DAT