Dear Kumar,

I remember that long time ago, I also met the problem, and now I could
not remember how I fixed this problem very clearly. Maybe I just change
some add(xxx) to getContentPane().add(xxx).

But I think that the reason of your problem is you add the canvas on the
upper layer of the JMenu. You know, the add(xxx) method of a container
in swing delegate different container within a SWING CONTAINER. If you
like you could step into the swing's source code to see which container
excute the actural add(xxx), every and even more than enough swing
source code at your hand.

I think you should follow the way that getContentPane().add(xxxx);
way.

For the container's archietechture, please read the doc on swing
connection.

Please continue your asking if my advice won't work.

Gao Lei


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
begin:          vcard
fn:             Gao Lei
n:              Lei;Gao
org:            StarGlobe
adr:            International Business Park;;#09-02, The Synergy;Singapore;Singaproe;609917;Singapore
email;internet: [EMAIL PROTECTED]
title:          Software Engineer
tel;work:       (0065)6656961
tel;fax:        (0065)6657912
tel;home:       (0065)96937680
x-mozilla-cpt:  ;-29328
x-mozilla-html: FALSE
version:        2.1
end:            vcard

Reply via email to