Setting an image's transparency?
Hi all, not quite sure how to word this question..but here he goes. I'm currently working on a GUI program for a Tetris game i've created. The board for it uses a JPanel, and overrides paintComponents. I was first creating a rectangle2D and filling it with the piece's color to represent each block of my pieces, which is fine but to me seems kind of boring.
What i now want to do is create a transparant image for the block, the reason i want it transparant is because I want some of the color of the piece to show through the image.
What i'm doing now is using a .png image file i made in photoshop and using the drawImage method in my panel to paint it. Now that i've done this, it seems to be sufficiently more sluggish.
Any ideas?
Thanks in advance.