hello everyone,
help me in centering the frame which i developed using swing. Here is the code:

import javax.swing.*;
public class RSAInterface extends JFrame
{
	public RSAInterface()
	{
		setTitle("RSA by adil");
		setBounds(200,200,300,300);
		setResizable(false);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		JPanel panel = new RSAPanel();
		this.add(panel);
	}
}
import javax.swing.*;
public class RSAInterfaceTest
{
	public static void main(String ar[])
	{
		JFrame f = new RSAInterface();
		f.setVisible(true);
	}
}

To center the frame use this method:

setLocationRelativeTo(null);