Guest_imported
New member
- Jan 1, 1970
- 0
Does anyone know how to make a class (that extends Canvas) to keep repainting automatically (in order to display new values) whenever someone invoke that action from the main class.
I have part of the code here which doesnt really work:
------------------------------------------------------
public class Diagram extends Canvas
{ ....
public void paint(Graphics g)
{
new Diagram(n.getName());
display(g);
}
....
}
------------------------------------------------------
When i debug, it does retrieve the new values each time someone invoke that action but it doesnt repaint the canvas with the new values, the initial values are always stay visible.
Thank you.
I have part of the code here which doesnt really work:
------------------------------------------------------
public class Diagram extends Canvas
{ ....
public void paint(Graphics g)
{
new Diagram(n.getName());
display(g);
}
....
}
------------------------------------------------------
When i debug, it does retrieve the new values each time someone invoke that action but it doesnt repaint the canvas with the new values, the initial values are always stay visible.
Thank you.