users@glassfish.java.net

Re: I m new to java, i m trying to get this to work....

From: <glassfish_at_javadesktop.org>
Date: Fri, 17 Apr 2009 13:44:11 PDT

First of all: You posted already four forum entries all with the same content. Three of those within six minutes. Please do not double post! If you want to correct an entry you can select "edit". Now you even posted a fourth posting. You should be a bit more patient. It is friday - many people here in Europe are already away for the weekend. And a few hours without any answer is pretty normal even at the best of times.

Furthermore this is a forum about server side java. So it is not the best forum to post a Swing-related question to.

Now to 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 selection the new components are added to the already existing ones. You could use pane.removeAll() immediately after getting the content pane to remove the previously added components.


-- 
Wolfram Rittmeyer
[Message sent by forum member 'writtmeyer' (writtmeyer)]
http://forums.java.net/jive/thread.jspa?messageID=342612