Revalidating my JPanel
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Einar_Hoest
Posted On:   Saturday, July 27, 2002 04:48 AM

I'm trying to draw a graph on a JPanel, and it seems to be working fairly well. My program reads some input from a file, and draws a corresponding graph.

The only problem I have, is when I try to add a new value in my program - I'd want the graph to be automatically updated. Calling graph.revalidate() doesn't do the trick - the graph is not updated until the application window is changed in some way (resizing, minimizing and maximizing, or covering and then uncovering it with another window).

Any suggestions would be greatly appreciated.

Re: Revalidating my JPanel

Posted By:   Mike_Friedrich  
Posted On:   Sunday, July 28, 2002 01:23 AM

Try invalidate() - this is what i use for certain components to do a redraw.


Regards, Mike

About | Sitemap | Contact