简体   繁体   中英

Getting the Java Swing 'No Drag' Cursor

是否可以获得对Swing“no Drag”Cursor的引用,因为它是OS特定的,或者可能会覆盖它

我想你可能正在寻找具有大量预定义游标的DragSource类。

I would look into java.awt.Toolkit::createCustomCursor if you want a cursor that is not predefined in java.awt.Cursor

public Cursor createCustomCursor(Image cursor,  
                                 Point hotSpot,  
                                 String name);

From the Java 6 Documentation :

Creates a new custom cursor object. If the image to display is invalid, the cursor will be hidden (made completely transparent), and the hotspot will be set to (0, 0).
Note that multi-frame images are invalid and may cause this method to hang.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM