how to recreate an frame?

shanth_77
shanth_77 used Ask the Experts™
on
Dear Experts,

How to destroy an instance of the frame completely and reopen it when an button is clicked. Is there any method to destroy the frame completely and recreate it?


Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
did u try frame.dispose()

vemul
Java Developer
Top Expert 2010
Commented:
If you want to reuse the frame then just use hide() it, and use show() when you want to redisplay it.
just setVisible(true) or setVisible(false)
no point destroying it
Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

Mick BarryJava Developer
Top Expert 2010

Commented:
thats the same as using hide() and show().
hehehe yea ..
:p

-=[sKySh@DoW]=-

Commented:
ya no point in destroying an object like that, you would probably find that it would slow down the gui more, throwing around objects like that just use hide() and show() or setvisible() to true or false.
shanth_77:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.

Commented:
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

- Points for objects

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

Venabili
EE Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial