close login JPanel

I created a (login)JPanel that activates a JFrame. How can I close this JPanel without closing the JFrame and without creating a leak?thanks
[154 byte] By [kiekeboea] at [2007-11-26 22:58:48]
# 1
> I created a (login)JPanel And then you added the panel to a JFrame of JDialog, since panels can't be displayed on their own.So you don't close a panel, you hide or dispose the frame or dialog you added it to.
camickra at 2007-7-10 12:24:57 > top of Java-index,Desktop,Core GUI APIs...