1

I have been working on a screen recorder app in Java.

I need to know ho to create a JFrame fully transparent?

Like this.

enter image description here

mKorbel
  • 109,107
  • 18
  • 130
  • 305
Umair Ayub
  • 15,903
  • 12
  • 65
  • 138
  • Caveat - I believe you can't do this with a decorated window, but take a look at [How to Create Translucent and Shaped Windows](http://docs.oracle.com/javase/tutorial/uiswing/misc/trans_shaped_windows.html), for [example](http://stackoverflow.com/questions/11844927/java-transparent-window/11853691#11853691) using both Java 6 and Java 7 and [an example with components](http://stackoverflow.com/questions/13546644/how-to-remove-drop-shadow-of-java-awt-frame-on-osx/13547998#13547998) – MadProgrammer Nov 30 '13 at 06:14

1 Answers1

1

You can make a JFrame partially transparent using the frame.setOpacity(float opacity) method.

For more information, see the Java Tutorial on the subject.

Caution: If you make if the frame 100% transparent, users won't be able to see it.

MultiplyByZer0
  • 5,209
  • 3
  • 29
  • 46