users@glassfish.java.net

Re: I m new to java, Component overlap!!!

From: Wolfram Rittmeyer <w.rittmeyer_at_jsptutorial.org>
Date: Fri, 17 Apr 2009 21:29:36 +0200

glassfish_at_javadesktop.org wrote:
> i tried to make this work, but i m unable to find out why the component overlap when i switch between menu items. thanks
>

First of all: You posted three forum entries. Furthermore this is a
forum about server side java. So not the best forum to post a
Swing-related question to. Please post your question only once in the
future and select your forum more carefully.

In answer to your question:

You always add components to your container (the content pane) but never
remove any of these. So after each menu entry the new components are
added to the already existing ones. You could use pane.removeAll()
immediately after getting the content pane.


--
Wolfram Rittmeyer
> [Message sent by forum member 'zamouri' (zamouri)]
> 
> http://forums.java.net/jive/thread.jspa?messageID=342533
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
> 
>