I may be wrong about this, but I believe AWT and Swing componenets are 
NOT supposed to be mixed like that (layered, that is), unless you want 
the AWT components to always be on top.  This is because (correct me if 
I'm wrong, someone, but I vaguely recall reading this on one of those 
Swing tutuorials on developer.javasoft.com) AWT components use native 
peers which always bully out your "lightweight", pure Java components.  
It is a technical difficulty inherent in the difference between the way 
the AWT and Swing components work (i.e., peer-based vs. non-peer-based).

Solutions?: Well, you could make your own "lightweight" Canvas (your own 
JCanvas) by extending Canvas, I think.  I'm not sure if or how this would 
solve the problem, though, as all Swing components are subclasses of 
Canvas as it is.  Hmmm...

Shane

On Tue, 9 Jun 1998, Chetan Kumar wrote:

> 
> Hello, it is same old problem, I am sorry if it is repeated. I tried this.
> 
> 1) Create a pulldown menu, JMenu.
> 2) Create a canvas, I did not find swing component for canvas, if there is
> please letme know.
> 3) Add canvas to JPanel,
> 4) Add JPanel and JMenu to Jframe.
> 
> Now the problem is that when I activate the menu, the pulldown menu come
> behind the canvas. i.e some item of the menu are hidden behind the canvas.
> 
> Any help ??
> 
> with thanks
> -Chetan 
> 
> 

Reply via email to