Question

The Compiz Showmouse plugin has some nice effects for people with low vision. Unfortunately, those effects don't work in Java applications out of the box. How can I get my Java Swing application to show the mouse effects like other apps do? I'm only concerned about supporting Linux users (mainly Linux Mint and Ubuntu). The Java app uses the Nimbus L&F and it is a Netbeans single frame app (but I build all frames manually with Gridbaglayout). I need the Compiz mouse effects to be consistent everywhere and all the time in my app, as long as the Compiz effects are enabled by the system.

Était-ce utile?

La solution

I've created a simple Swing frame:

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've ran it on a 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've enabled the Show Mouse effect, and it was running on top of the Swing window just fine.

So elaborate your question please. What exactly doesn't work and what exact configuration.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top