Problem with setVisible(false)

I everybody!!I have a some panels in a JFrame, disposed ones underneath the others. But when I make one of the bottom invisble doing:jPanel.setVisible(false); the ones in the top becomes down!!Is there any way to avoid this?Thanks in advance
[283 byte] By [GrEga] at [2007-11-27 7:36:42]
# 1

If you have multiple panels sharing the same area in a JFrame then you should be using a [url http://java.sun.com/docs/books/tutorial/uiswing/layout/visual.html]Card Layout[/url].

Or you need to remove the old panel before adding the new panel.

If you need further help then you need to create a [url http://homepage1.nifty.com/algafield/sscce.html]Short, Self Contained, Compilable and Executable, Example Program[/url] (SSCCE) that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.

Don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags[/url] so the posted code retains its original formatting.

camickra at 2007-7-12 19:17:16 > top of Java-index,Desktop,Core GUI APIs...
# 2
Ok buddies! The problem just desappear. I'm using NetBeans IDE and I disposed the components again and all works fine.Thanks anyway!
GrEga at 2007-7-12 19:17:16 > top of Java-index,Desktop,Core GUI APIs...