Results 1 to 3 of 3
  1. #1
    chk
    chk is offline Member
    Join Date
    Jul 2010
    Posts
    3
    Rep Power
    0

    Default 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.

  2. #2
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

    Default

    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).

    Much luck.

  3. #3
    al_Marshy_1981 is offline Senior Member
    Join Date
    Feb 2010
    Location
    Waterford, Ireland
    Posts
    748
    Rep Power
    5

    Default

    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.

Similar Threads

  1. Replies: 5
    Last Post: 06-14-2010, 06:10 PM
  2. JFrame from a JFrame in project
    By anah in forum AWT / Swing
    Replies: 2
    Last Post: 04-19-2010, 06:20 PM
  3. Replies: 6
    Last Post: 04-12-2010, 11:33 AM
  4. Passing data from one JFrame to another JFrame
    By tarami in forum New To Java
    Replies: 3
    Last Post: 08-06-2009, 05:44 PM
  5. Replies: 4
    Last Post: 04-22-2009, 11:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •