How to make Java Swing applications display the mouse cursor effect of Compiz mouse plugin (Ubuntu)

Compiz showmouse plugin has some good effects on people with low vision Unfortunately, these effects do not work in out of the box Java applications How can I make my java swing application display mouse effects like other applications? I only care about supporting Linux users (mainly Linux mint and Ubuntu) The Java application uses nimbus L & F, which is a NetBeans single frame application (but I use gridbaglayout to build all frames manually) I need the Compiz mouse effect to be consistent in my application, as long as the system enables the Compiz effect

Solution

I created a simple swing framework:

import javax.swing.*;

public class A extends JFrame {

public static void main(String[] args) {
    A a = new A();
    a.setSize(100,100);
    a.setVisible(true);
}
}

I run it on JDK 1.6:

$java -version
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10) (Gentoo build 1.6.0_22-b22)
OpenJDK 64-Bit Server VM (build 20.0-b10,mixed mode)

I enabled the show mouse effect, which runs right at the top of the swing window

Please elaborate on your problem What does not work and what is the specific configuration

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>