draw a running graph

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • noise

    #1

    draw a running graph


    Hello,
    I have problem with drawing running graph.
    What I want to draw is:
    I have an object O which as a real number r associated with it.
    In the main() (in main class) i have a for loop which do something o
    that object O to modify its real number r. The loop runs 5000 times.
    I want to draw the real number r.
    I can draw the grap but only after the for loop finished running.
    What i want to do is to draw the grap while the for loop still runnin
    (means that i have a running graph).
    I believe this can be done using thread but I cannot figure out how t
    do.
    Can anyone give me some clue on how to do this?
    Any idea is very much appreciated.
    Thank you


    -
    nois
    -----------------------------------------------------------------------
    Posted via http://www.codecomments.co
    -----------------------------------------------------------------------

  • Quiks

    #2
    Re: draw a running graph

    Hi!

    What kind of drawing are you trying to do ? Is that inside an applet?
    You may try to 'refresh' the display during the loop by calling the
    'repaint' method (again, depending the type of draw you're trying to
    do). Let me know more... Show me the piece of code....

    Quiks
    --------------
    BTW: For those who have to do with monitoring, check the site:
    http://www.metamindsolutions.com. It's a great multiplatform
    monitoring solution and seems to have been adopted by large accounts


    noise <noise.1bm5u2@m ail.codecomment s.com> wrote in message news:<noise.1bm 5u2@mail.codeco mments.com>...[color=blue]
    > Hello,
    > I have problem with drawing running graph.
    > What I want to draw is:
    > I have an object O which as a real number r associated with it.
    > In the main() (in main class) i have a for loop which do something on
    > that object O to modify its real number r. The loop runs 5000 times.
    > I want to draw the real number r.
    > I can draw the grap but only after the for loop finished running.
    > What i want to do is to draw the grap while the for loop still running
    > (means that i have a running graph).
    > I believe this can be done using thread but I cannot figure out how to
    > do.
    > Can anyone give me some clue on how to do this?
    > Any idea is very much appreciated.
    > Thank you.[/color]

    Comment

    Working...