|
The component's cursor property can be changed at any time by calling Component.setCursor() in Java. See the java.awt.Cursor class for available predefined cursor shapes.
// Create a component
Component component = new Button("OK");
// By default, the component's cursor is Cursor.DEFAULT_CURSOR
Cursor cursor = component.getCursor();
// Change the component's cursor to another shape
component.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
|
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.