Results 1 to 3 of 3
  1. #1
    dalu is offline Member
    Join Date
    Mar 2011
    Posts
    23
    Rep Power
    0

    Default refresh a jframe

    Hi,
    I have created a simple JFrame with components displaying some data on it. I want to reload the data after a specific time interval say one minute. Does a refresh serve my purpose? How to implement this?

    Regards,
    dalu

  2. #2
    Junky's Avatar
    Junky is offline Grand Poobah
    Join Date
    Jan 2011
    Location
    Dystopia
    Posts
    3,800
    Rep Power
    7

    Default

    Use a Swing Timer for your time interval. Update your fields etc with the new data. Call repaint.

  3. #3
    DarrylBurke's Avatar
    DarrylBurke is online now Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,458
    Rep Power
    20

    Default

    Or maybe not call repaint, unless you are using some custom component that doesn't update its visual representation correctly.

    db

Similar Threads

  1. Cannot refresh a JLabel on a JFrame
    By carnotan in forum AWT / Swing
    Replies: 11
    Last Post: 03-25-2011, 04:02 PM
  2. Cant refresh JFrame, jTextArea1
    By yahyaaa in forum New To Java
    Replies: 9
    Last Post: 01-27-2011, 03:05 PM
  3. Replies: 5
    Last Post: 06-14-2010, 07:10 PM
  4. JFrame refresh problem
    By elliot in forum AWT / Swing
    Replies: 5
    Last Post: 02-04-2010, 12:18 AM
  5. Replies: 4
    Last Post: 04-23-2009, 12:02 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
  •