How can I make light box effect in swing? I want to add JPanel on JFrame in layered pane and want to give lightbox effect in this. Is this possible in swing? Is there any swing component to do this?
Something like in following image:
How can I make light box effect in swing? I want to add JPanel on JFrame in layered pane and want to give lightbox effect in this. Is this possible in swing? Is there any swing component to do this?
Something like in following image:
This can be done using the graphics context's AlphaComposite
. I'd start with 50% transparent black and adjust empirically. This handy utility may help.
I want to add a panel on a frame which is already loaded with data
You should be able to use Layered Panes. You can add transparent panels to the top layer.
Or maybe you are talking about a Glass Pane.