src/macosx/classes/sun/lwawt/LWTextAreaPeer.java

Print this page

        

@@ -25,10 +25,11 @@
 
 
 package sun.lwawt;
 
 import java.awt.Component;
+import java.awt.Cursor;
 import java.awt.Dimension;
 import java.awt.Point;
 import java.awt.TextArea;
 import java.awt.event.TextEvent;
 import java.awt.peer.TextAreaPeer;

@@ -70,10 +71,19 @@
     JTextComponent getTextComponent() {
         return getDelegate().getView();
     }
 
     @Override
+    protected Cursor getCursor(final Point p) {
+        final boolean isContains;
+        synchronized (getDelegateLock()) {
+            isContains = getDelegate().getViewport().getBounds().contains(p);
+        }
+        return isContains ? super.getCursor(p) : null;
+    }
+
+    @Override
     protected Component getDelegateFocusOwner() {
         return getTextComponent();
     }
 
     @Override