Transparent AWT component on freeform [message #616949] |
Mon, 28 January 2008 07:32 |
Eclipse User |
|
|
|
Originally posted by: divannn.mail.ru
Hi all,
I have a problem with a transparent AWT bean placed on VE diagram
(freeform).
Here my simplified custom component:
public class CTransparentBean extends java.awt.Container {
@Override
public void paint(Graphics g) {
//fill bounds with transparent red color.
g.setColor(new Color(255,0,0,50));
g.fillRect(0, 0, getWidth(), getHeight());
super.paint(g);
}
}
In VE during modeling when I place this bean inside some other AWT
container -
its works fine, i.e. picture is transparent red.
But if I put this bean on freeform - it appears as BLACK rect! =(
It is strange. I checked AwtFreeFormDialog where freeform beans realy
placed -
there my bean painted properly as transparent.
If I fill my CTransparentBean with non-transparent color (for instance,
red) -
it is painted normally on free form!
Is it correct behaviour? What is wrong with my transparent bean?
|
|
|
Powered by
FUDForum. Page generated in 0.02313 seconds