I'm trying something along these lines:
private static class TexturePanel extends JPanel {
@Override
protected void paintComponent(Graphics graphics) {
// drawing code
// calc fps
repaint();
}
}
Is calling repaint()
in paintComponent()
the right approach to this?