@Override
	public void paintComponent(Graphics g) {
		g.setColor(Color.black);
		g.fillRect(0, 0, data.length, HALF_WIDTH * 5);
		g.setColor(Color.white);
		g.setFont(DATA_FONT);
		int j = 0;
		for (Entry< Long,Double> ent : freq_s.entrySet()) {
			 
				j += 3;
				g.drawString(" frequency: " + ent.getKey(), 40, FONT_SIZE * j + 6 * j);
				g.drawString(" mag_sum: " + ent.getValue(), 40, FONT_SIZE
						* (j + 1) + 6 * (j + 1));
		 
		}
		for (int i = 0; i < data.length; i++) {
			g.fillOval(i, (int) (offset + (HALF_WIDTH - vscale * data[i])), 4,
					4);
		}
		g.setColor(Color.DARK_GRAY);
		for (int i = 0; i < data.length; i += 10) {
			g.drawLine(i, 0, i, 2 * HALF_WIDTH);
		}
		g.setColor(Color.GRAY);
		for (int i = 0; i < data.length; i += 50) {
			g.drawLine(i, 0, i, 2 * HALF_WIDTH);
		}
		g.setColor(new Color(0, 100, 150));
		for (int i = 0; i < data.length; i += 500) {
			g.drawLine(i, 0, i, 2 * HALF_WIDTH);
		}
	}