dcsimg
How to remove completely a class?.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   geetha_ramaiyan
Posted On:   Tuesday, September 18, 2001 10:11 PM

I need to remove completly a class.Say LoginScreen for example is common fopr all application.After the user complets the login part.the Login Screen is not required.so we can dispose the class. If tried to dipose that class which extends JPanel.Still it is not getting diposed.i tryed with the following. Say the panelclass as Loginpanel: loginpanel.dispose(); loginpanel.removeALl(); loginPanel=null; loginPanel.removeActionListener...... i tryed to remove all listeners. but no use it is still remaining.what to do?. Someone pls try to give me Suggestion regarding this problem.

Re: How to remove completely a class?.

Posted By:   Christopher_Schultz  
Posted On:   Wednesday, September 19, 2001 08:21 AM

Do you mean that the Frame is still visible?



If so, you'll need to dispose of the frame, not just the panel.




JFrame frame = new JFrame("Test window");
frame.getContentPane().add(new JLabel("Here is some text!"));

.
.
.

frame.setVisible(false);
frame.dispose();



Hope that helps,

-chris
About | Sitemap | Contact