package theGhastModding.midiPlayer.gui;

import java.awt.Dimension;

import javax.swing.JDialog;

import theGhastModding.midiPlayer.main.TheGhastMidiPlayerMain;
import javax.swing.JLabel;
import java.awt.Font;

@SuppressWarnings("serial")
public class FPSWindow extends JDialog {
	
	private JLabel lblFps;
	
	public FPSWindow() {
		super(TheGhastMidiPlayerMain.frame, "FPS");
		getContentPane().setLayout(null);
		setResizable(false);
		setDefaultCloseOperation(JDialog.DO_NOTHING_ON_CLOSE);
		getContentPane().setPreferredSize(new Dimension(200, 50));
		setLocationRelativeTo(TheGhastMidiPlayerMain.frame);
		lblFps = new JLabel("FPS: 0");
		lblFps.setFont(new Font("Tahoma", Font.BOLD, 30));
		lblFps.setBounds(10, 11, 180, 28);
		getContentPane().add(lblFps);
		
		pack();
	}
	
	public void setFPS(int fps) {
		lblFps.setText("FPS: " + Integer.toString(fps));
	}
	
}