Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » Transparent AWT component on freeform
Transparent AWT component on freeform [message #616949] Mon, 28 January 2008 07:32
Eclipse UserFriend
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?
Previous Topic:Transparent AWT component on freeform
Next Topic:VISUAL EDITOR
Goto Forum:
  


Current Time: Fri Apr 19 09:27:24 GMT 2024

Powered by FUDForum. Page generated in 0.02313 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top