Implementing Cursor in Java with some Transparency

后端 未结 4 1425
情深已故
情深已故 2021-01-18 14:52

I have a 35x40 px. png image I want to use as a custom cursor in a Swing application. The image has a glow so contains alpha transparency values. Problem is when I attempt t

4条回答
  •  不思量自难忘°
    2021-01-18 15:19

    If you are desperate and absolutely must have transparent cursor, no matter the consequences, you can use JNI and set the cursor manually using Win32 API. Windows since XP support alpha cursors, so you should be ok with that.

    But you lose platform independence. And based on Windows settings, the alpha blending might be turned off for that particular user.

提交回复
热议问题