aboutsummaryrefslogtreecommitdiffstats
path: root/demos/MiscDemos/gearRenderer.java
diff options
context:
space:
mode:
Diffstat (limited to 'demos/MiscDemos/gearRenderer.java')
-rw-r--r--demos/MiscDemos/gearRenderer.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/demos/MiscDemos/gearRenderer.java b/demos/MiscDemos/gearRenderer.java
index 345790a..aa5a803 100644
--- a/demos/MiscDemos/gearRenderer.java
+++ b/demos/MiscDemos/gearRenderer.java
@@ -328,7 +328,7 @@ public class gearRenderer
//System.out.println("mouse dragged: ");
int x = evt.getX();
int y = evt.getY();
- Dimension size = gldrawable.getSize();
+ Dimension size = evt.getComponent().getSize();
float thetaY = 360.0f * ( (float)(x-prevMouseX)/(float)size.width);
float thetaX = 360.0f * ( (float)(prevMouseY-y)/(float)size.height);