| Author |
Closing a panel
|
Mythily Jaganathan
Greenhorn
Joined: Aug 22, 2006
Posts: 19
|
|
Hi all, I have to close(exit) a JPanel without using System.exit() method. Please help me to solve this problem. Thanks in advance, Mythily
|
 |
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
|
posted

0
|
is it the contentPane for a dialog/frame? if so, use the dialog/frame's dispose()
|
 |
Mythily Jaganathan
Greenhorn
Joined: Aug 22, 2006
Posts: 19
|
|
Hi, It is not a contentpane. It is a panel with griddedbag layout. Thanks Mythily
|
 |
Michael Dunn
Ranch Hand
Joined: Jun 09, 2003
Posts: 4632
|
posted

0
|
all you can do is remove it from its container. then, depending on container type, you call validate(); or revalidate(); and, sometimes a call to repaint() is also required
|
 |
 |
|
|
subject: Closing a panel
|
|
|