e574. changing the cursor.txt

来自「这里面包含了一百多个JAVA源文件」· 文本 代码 · 共 11 行

TXT
11
字号
A component has a cursor property which controls the shape of the cursor when the cursor is above the component. The component's cursor property can be changed at any time by calling Component.setCursor(). See the Cursor class for available predefined cursor shapes. 
    // Create a component
    Component comp = new Button("OK");
    
    // By default, the component's cursor is Cursor.DEFAULT_CURSOR
    Cursor cursor = comp.getCursor();
    
    // Change the component's cursor to another shape
    comp.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?