Results 1 to 4 of 4

Thread: update a jlabel

  1. #1
    niba10 is offline Member
    Join Date
    Feb 2011
    Posts
    30
    Rep Power
    0

    Default update a jlabel

    Hi I want to update a jlabel when the jframe is runnig for example:
    I have a server gui and there is label called online and its counter the users online I know how to update it only if I press a button but what I want to do
    is to update it always when the jframe is running I hope you can understand what i mean ...

  2. #2
    KevinWorkman's Avatar
    KevinWorkman is offline Crazy Cat Lady
    Join Date
    Oct 2010
    Location
    Washington, DC
    Posts
    4,013
    Rep Power
    10

    Default

    Use a Timer? Or just update it whenever you update the counter?
    How to Ask Questions the Smart Way
    Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!

  3. #3
    niba10 is offline Member
    Join Date
    Feb 2011
    Posts
    30
    Rep Power
    0

    Default

    hmm what is a timer in java ?? i know there is timer in visual basic
    but i dont know timer in java..
    i want to update it always the application is running where i should put the code of the update?

  4. #4
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,453
    Rep Power
    20

    Default

    hmm what is a timer in java ?? i know there is timer in visual basic
    but i dont know timer in java..
    Open wide.
    How to Use Swing Timers (The Java™ Tutorials > Creating a GUI With JFC/Swing > Using Other Swing Features)

    Don't forget to wash the spoon.

    db

Similar Threads

  1. Problem about JLabel not update in JPanel
    By fantasyme in forum Java Applets
    Replies: 11
    Last Post: 10-16-2011, 08:00 AM
  2. Update JLabel during loop automatically
    By carnado2008 in forum AWT / Swing
    Replies: 4
    Last Post: 01-22-2011, 03:55 PM
  3. Jlabel update problem
    By fantasyme in forum AWT / Swing
    Replies: 3
    Last Post: 04-14-2010, 06:10 AM
  4. Adding a JLabel to a JPanel - jlabel not showing
    By Bongeh in forum New To Java
    Replies: 17
    Last Post: 04-07-2010, 12:02 AM
  5. JLabel
    By Jack in forum AWT / Swing
    Replies: 2
    Last Post: 07-02-2007, 02:55 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
  •