Results 1 to 2 of 2

Thread: refresh JPanel

  1. #1
    olesja is offline Member
    Join Date
    Apr 2008
    Posts
    2
    Rep Power
    0

    Default refresh JPanel

    Hello, everybody!
    I am here struggling with refreshing a JPanel (ep5) that is inside another JPanel (p3) that is being added to the JFrame in the program.

    ep5 is created separately (and is reading some data from a text file). Then after I click either of the buttons the account is added or deleted to this text file. So the buttons are working perfectly fine. But when I try to revalidate the JPanel nothing happens. I have tried everything by now, so I would really appreciate it if someone helped, cuz i feel it somewhere close but I am just stuck there one step away.
    Here is how the panels p3 and ep5 are created, and since p3 is not finished yet, then I really need to only refresh ep5.
    Java Code:
    p3.setBackground(c3);
    ep5=new ThirdPanelA();    
    p3.add(ep5);
    //content.add(p3);
    add(p3);
    So, I need to revalidate a JPanel inside another JPanel.

    PLEASE, PLEASE, PLEASE!!!! I am really desperate right now.

    P.S. The panel ep5 is not being painted. It is just reading data from text file, and generates it using GridLayout.
    Last edited by olesja; 04-16-2008 at 02:05 AM. Reason: forgot to mention one thing

  2. #2
    olesja is offline Member
    Join Date
    Apr 2008
    Posts
    2
    Rep Power
    0

Similar Threads

  1. My Simple Refresh Problem
    By pmcastillo in forum New To Java
    Replies: 0
    Last Post: 03-26-2008, 08:59 AM
  2. refresh a different window
    By marceldupont in forum AWT / Swing
    Replies: 3
    Last Post: 03-22-2008, 03:44 AM
  3. How to Refresh the same page by JSP
    By AbuAziz in forum JavaServer Pages (JSP) and JSTL
    Replies: 2
    Last Post: 12-10-2007, 05:06 AM
  4. Refresh session
    By cachi in forum JavaServer Pages (JSP) and JSTL
    Replies: 1
    Last Post: 08-07-2007, 08:52 AM

Posting Permissions

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