I'm new to DSP. I'm trying to create application for educational purposes on java. I want to compute FIR filter coefficients and plot it's frequency response.
To compute coefficients I want to use ifft of ideal frequency response, which is basically rectangular window. I can compute coefficients with this method and my FIR filtering signals. Then I want to explore it's frequency response. As I know I can get it from impulse response of filter through fft (But then it would be the same rectangular window, right?). And I get the same rectangular ideal frequency response, but I want real frequency response. Like in that picture.

How can I do that?