public void draw_frame_rate(Graphics2D g2) {

        if (( XHSIStatus.status.equals(XHSIStatus.STATUS_RECEIVING) ) || ( XHSIStatus.status.equals(XHSIStatus.STATUS_PLAYING_RECORDING) )) {
            g2.setColor(Color.BLACK);
            g2.setFont(gc.font_statusbar);

            // draw scale
            g2.drawString("FPS",fps_x, fps_y + 11);
            for (int i=0;i<=40;i+=10) {
                g2.drawLine(
                        fps_x + 30 + (i*fps_pixels_per_frame),
                        fps_y + 10,
                        fps_x + 30 + (i*fps_pixels_per_frame),
                        fps_y + 13);
            }
            if (this.frame_rate > 40) {
                this.frame_rate = 40;
                g2.drawString("+", fps_x + 33 + (40*fps_pixels_per_frame), fps_y + 11);
            }

            g2.setFont(gc.font_statusbar);
            g2.drawString("0", fps_x + 28, fps_y + 23);
            g2.drawString("20", fps_x + 25 + (20*fps_pixels_per_frame), fps_y + 23);
            g2.drawString("40", fps_x + 25 + (40*fps_pixels_per_frame), fps_y + 23);

            // draw bar
            if (this.frame_rate > 12) {
                g2.setColor(Color.GREEN.darker());
            } else if (this.frame_rate > 8) {
                g2.setColor(Color.YELLOW.darker());
            } else if (this.frame_rate > 4) {
                g2.setColor(Color.ORANGE);
            } else {
                g2.setColor(Color.RED);
            }
//            g2.fillRoundRect(
//                    fps_x+30,
//                    fps_y,
//                    (this.frame_rate * fps_pixels_per_frame),
//                    8,
//                                        5,
//                                        5);
            g2.fillRect(
                    fps_x+30,
                    fps_y,
                    (this.frame_rate * fps_pixels_per_frame),
                    8);
        }

    }