java.awt
Class Component
java.lang.Object
|
+--java.awt.ComponentAll Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
Button, Canvas, Checkbox, Choice, Container, Label, List, Scrollbar, TextComponent setCursor
public void setCursor(Cursor cursor)
Sets the cursor image to the specified cursor. This cursor image is displayed when the contains method for this component returns true for the current cursor location, and this Component is visible, displayable, and enabled. Setting the cursor of a Container causes that cursor to be displayed within all of the container's subcomponents, except for those that have a non-null cursor. Parameters:
cursor - One of the constants defined by the Cursor class; if this parameter is null then this component will inherit the cursor of its parent
Since:
JDK1.1
See Also:
isEnabled(), isShowing(), getCursor(), contains(int, int), Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String), Cursor
Class Component
java.lang.Object
|
+--java.awt.ComponentAll Implemented Interfaces:
ImageObserver, MenuContainer, Serializable
Direct Known Subclasses:
Button, Canvas, Checkbox, Choice, Container, Label, List, Scrollbar, TextComponent setCursor
public void setCursor(Cursor cursor)
Sets the cursor image to the specified cursor. This cursor image is displayed when the contains method for this component returns true for the current cursor location, and this Component is visible, displayable, and enabled. Setting the cursor of a Container causes that cursor to be displayed within all of the container's subcomponents, except for those that have a non-null cursor. Parameters:
cursor - One of the constants defined by the Cursor class; if this parameter is null then this component will inherit the cursor of its parent
Since:
JDK1.1
See Also:
isEnabled(), isShowing(), getCursor(), contains(int, int), Toolkit.createCustomCursor(java.awt.Image, java.awt.Point, java.lang.String), Cursor
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货