The thing is that i have got the two cylinders on the canvas. So wherever i click, the two cylinders rotate simultaneously. I understand that by having mouselisteners for each cylinder separately will solve the problem, however since i am adding the cylinders on the canvas, therefore i can only invoke the mouselistener on the canvas instance not the cylinder instance.
Can u please post a code of how a mouselistener can be invoked from a cylinder instance.
How do you know which cylinder that you are trying to rotate?
You will need some sort of bounding box to identify which cylinder you want to rotate.
If you mouse click is inside of bounding box 1, rotate cylinder 1.
I have used MouseRotate and passed the cylinder transform group as its transform group. But the problem still is that the rotating via mouse anywhere on the canvas rotates the mouse, which i don't want. THerefore i had used the MouseRotate and set the transform group of the cylinder, so that only that particular transform group gets rotated.
I can set the scheduling bounds of this behavior (MouseRotate) but still the canvas rotates the mouse.
Can you please tell me how to restrict the scheduling bounds only to the diameter of the cylinder and not the entire canvas.
Help! I want to create a java program that finds the highest even integer among the values entered by the user. Stop asking values when a value less than 1 have been entered. If no even integer is entered, display "No Even Integer"
Hi, as I was told that my code doesn’t scale well at all, I thought perhaps I’d try to get a better understanding of interfaces/abstract classes and classes and the relationship between them.
I don’t want at this stage work on a big separate project as I've already got plenty ...