Hello Friends,
I want to draw three rectangle of same size overriding each other
paint()
{
// g.setopacity(0.5f)
g.setColor(red);
g.fillRect(0,0,30,10);
g.setColor(red);
g.fillRect(10,0,30,10);
g.setColor(red);
g.fillRect(20,0,30,10);
}
But each rectangle are overriding each other, so I can’t see now that over the last rectangle where other two rectangles are. I want my all rectangle to be transparent so that i can see each rectangle’s boundary(Yeah colour override will change original colour but boundary can help). I need result like following image
{In above image only three rectangles are there, below one is Red, second is green and third is blue[they are like six but they are overrided to each other]}
I tried to get it using setOpacity to different rectangle fill, and also tried generic opacity set to 0.5f for all fillrect but didn’t get right one.
Thanks Juiciest.