0

I'm trying to create a robot clicker that reads a user's clicks and key inputs. After recording, it should mimic the users actions upon command. Apparently, the best way to listen to these events is by creating a full screen translucent JFrame with listeners. (If you know of a better way please tell me. Even if it is Windows platform specific).

To do this, I made a full screen translucent JFrame.

    // Why do I need this line of code?
    JFrame.setDefaultLookAndFeelDecorated(true);

    JFrame frame = new JFrame();
    frame.setExtendedState(JFrame.MAXIMIZED_BOTH); 
    frame.setOpacity(0.55f);
    frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    frame.setVisible(true);

This works fine and all, but I hate the Look and Feel of it. Is there a way to get the normal Java look and feel here?

The Java tutorial shows the look and feel I want (It's the first picture for uniform translucency). http://docs.oracle.com/javase/tutorial/uiswing/misc/trans_shaped_windows.html

Thanks in advance!

Connor
  • 670
  • 3
  • 9
  • 29
  • if you are using java 7 you can use `JLayer` or in previous version swingx `JXLayer`, or using a glasspane to capture for example mouse events . – nachokk Sep 15 '13 at 19:34
  • [partially possible, see, read comments too .....](http://stackoverflow.com/questions/16219111/cant-transparent-and-undecorated-jframe-in-jdk7-when-enabling-nimbus) – mKorbel Sep 15 '13 at 19:45

0 Answers0