2

I was trying to make a simple GIF capturing app, but I needed to make a hole/transparent space in a JFrame based on a JPanel. I tried many things, from per-pixel transparency (only works with undecorated windows...), custom shapes (again, undecorated windows only), etc...

This is what I want (edited): Good

This is what I have: Bad

In .NET Framework, it's as simple as setting the TransparencyKey color of the form, and setting the panel's background color to that color.

I'm wondering if this is possible....

dcubix
  • 187
  • 2
  • 10
  • 1
    I would recommend a different approach [as seen here](http://stackoverflow.com/a/11007422/418556). This way, the frame can still have its decorations, while the user can select areas right up to the top of the screen (plus all the way to the left, right and bottom). – Andrew Thompson Sep 27 '16 at 02:44

0 Answers0