🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.swing
3 messages
3 total messages Started by J. Berg Sat, 28 Feb 2004 17:44
JMenuItem and Canvas
#1248
Author: J. Berg
Date: Sat, 28 Feb 2004 17:44
7 lines
974 bytes
Why JMenuItem shows under Canvas?
I'm using setJMenuBar method on frame.
getContentPane().add() method don't work too.

Thanks

J. Berg
Re: JMenuItem and Canvas
#1250
Author: John McGrath [TeamB]
Date: Mon, 01 Mar 2004 05:37
18 lines
1404 bytes
On 2/28/2004 at 12:44:38 PM, J. Berg wrote:

> Why JMenuItem shows under Canvas?
> I'm using setJMenuBar method on frame.
> getContentPane().add() method don't work too.

Because Canvas is a heavyweight component and JMenuItem is lightweight.
You should generally avoid using heavyweight components along with
Swing.  So avoid the components in the package "java.awt".

-- 
Regards,

John McGrath [TeamB]

---------------------------------------------------
Before sending me e-mail, please read:
    http://www.JPMcGrath.net/newsgroups/e-mail.html
Re: JMenuItem and Canvas
#1254
Author: J. Berg
Date: Mon, 01 Mar 2004 11:09
28 lines
1999 bytes
Thanks for your explanation :-)

J. Berg

Jo�o Henrique Berg dos Santos joaoJo�o Henrique Berg dos Santos
joao.hbsantos@terra.com.br Presidente Prudente - SP H� tr�s coisas que nunca
voltam atr�s: a flecha lan�ada, a palavra pronunciada e a oportunidade
perdida.
"John McGrath [TeamB]" <ng-b@JPMcGrath.net> escreveu na mensagem
news:4042cbfd$1@newsgroups.borland.com...
> On 2/28/2004 at 12:44:38 PM, J. Berg wrote:
>
> > Why JMenuItem shows under Canvas?
> > I'm using setJMenuBar method on frame.
> > getContentPane().add() method don't work too.
>
> Because Canvas is a heavyweight component and JMenuItem is lightweight.
> You should generally avoid using heavyweight components along with
> Swing.  So avoid the components in the package "java.awt".
>
> -- 
> Regards,
>
> John McGrath [TeamB]
>
> ---------------------------------------------------
> Before sending me e-mail, please read:
>     http://www.JPMcGrath.net/newsgroups/e-mail.html
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads