Hi everyone, I've been lurking around for awhile, I've created an account in frustration with trying to solve this problem.
I want to refresh the contents of a jFrame periodically after it is initially displayed by the user with a button click. The frame has a jFreeChart on it based on data read in from a file, and I want it to redraw the chart regularly showing any new data written to this input file.
I tried putting in a loop with a delay around the whole draw function and having the chart re-display that way, but the frame just turns black while the loop is running and never really updates...
I also tried branching out the re display to another
thread, but this has likewise failed to do what I thought it would.
How might I be able to get the frame to update its display at some interval, while using any new data that may have been added to the input file?
code to display chart:
Code to read in from file: