g.drawString("f" + frameCount, 50, 65);
g.drawString(fPSstr, 50, 65);
    public void updateFPSCounter(Graphics g) {	long frameStartTime = System.currentTimeMillis();        if (frameCount == 0) {            averageFPSStartTime = frameStartTime;        }        frameCount++;        if (averageFPSStartTime + TIME_INTERVAL < frameStartTime) {            int time = (int)(frameStartTime - averageFPSStartTime);            if (0 != time) {                averageFPS = frameCount * 1000 / time;            }            if (dot) {                fPSstr = averageFPS + " FPS";            } else {                fPSstr = averageFPS + ":FPS";            }            frameCount = 0;            dot = !dot;        }        g.setColor(Color.WHITE);        g.fillRect(50, 50, 50, 20);        g.setColor(Color.BLACK);        g.drawString("f" + frameCount, 50, 65);    }