Destroying a JFrame
I have a program that creates a frame, adds some panels, buttons textfields, etc. This frame displays data from a table. Depending on what type of entry selected there are a different number of text fields. I have a button to close the form but keeps the table open so you can select another entry. When I click to view the new entry it just places the new textfields, buttons, etc on top of what I previously had. How can I make it so the frame is destroyed soI can create a new one with the new data. I have tried frame.remove(), frame.dispose(). Any help would be appreciated. Thanks.
Not sure about the others, but myself, I can't tell what you're doing wrong based on your description alone. You should look into creating and posting an SSCCE (please see the link).
Not sure why you would want to destroy the original frame? Like fubarable said you need to post some code so we can get an idea what you are doing.