This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I've trying to learn some Java2D/GUI and as a little "test project", I am creating an applet that looks like a line graph. Each "Bar" is just a line(10 px wide) and I have drawn an arrow.gif on the end of each line.
When I drag the arrows, the line should grow and shrink. Problem: When I click on it, the mouse positions itself to the far "left" edge of the image. So, I have no issues dragging the line to the right.
But, when I drag to the left, I run into problems. If I drag too fast, the pointer gets off the image and the dragging stops(b/c the onImage method returns null).
I've tried creating a larger bounding box for the image, and that helps a little, but I still have issues when I drag too fast.