Plotting (and updating) a curve in a Graphics context


Hello, people,

I created a Component which draws the Fourier spectrum given a float array of samples as input.

When the user wants to draw the Fourier spectrum, he clicks in a button which calls SpectrumAnalyzerComponent::drawSpectrumFromTimeDomain(…) method. This method calculates a FFT over the samples and finally calls the repaint() method to update the spectrum plot. However the plot is updated only when I resize the window.

What can I do to make a plot to be instantly updated when the user clicks the update button?



It was just a dummy mistake :stuck_out_tongue:

I forgot to assign a button listener to my button… sorry :stuck_out_tongue: