void (@NotNull Graphics g) { Graphics gr = g.create(); try { gr.setColor(Color.blue); Rectangle r = myFpsBarBounds.get(); gr.fillRect(r.x, r.y, r.width, r.height); gr.setColor(Color.green); gr.setFont(myFont.get()); int fps = getFps(); gr.drawString((fps == 0 ? "__" : fps) + " fps", FPS_STR_OFFSET, FPS_STR_OFFSET + myFont.get().getSize()); } finally { gr.dispose(); } }