Results 1 to 2 of 2
Thread: Setting an image's transparency?
- 12-03-2008, 11:12 AM #1Member
- Join Date
- Mar 2008
- Rep Power
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.
Thanks in advance.
- 12-03-2008, 01:01 PM #2
- By Java Tip in forum SWT TipsReplies: 0Last Post: 07-25-2008, 03:26 PM
- By tim in forum JDBCReplies: 1Last Post: 02-14-2008, 10:55 PM
- By BlitzA in forum New To JavaReplies: 6Last Post: 12-29-2007, 01:54 PM