JFrame the same shape as an Image / Program running in background
Posted
by
Jan Weber
on Stack Overflow
See other posts from Stack Overflow
or by Jan Weber
Published on 2012-11-27T16:34:53Z
Indexed on
2012/11/27
23:08 UTC
Read the original article
Hit count: 289
My question is simple, the solution surely not. I am looking for a way to shape a JFrame the same as an Image it will be displaying. By shape I mean the shape of the pixels that have an alpha != 0. I've already found a working example using a GeneralPath object, but it created ~110000 "nodes" for an Image of about 500*400, so starting the JFrame took more than 2 minutes, which is definitely not the desired effect, the startup should be in under 2 seconds.
Thanks for your time.
© Stack Overflow or respective owner