下面的程序没有错误为什么运行不了啊 ?   没有显示框框package Mydata;
/*
 * 此窗口为用户的登录界面
 */
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
public class LoginFrame extends JFrame implements ActionListener { private JLabel topic;

private JLabel name;
private JTextField userText;
private JLabel pw;
private JPasswordField pwText;

private JButton login;
private JButton cancel;
private Container contentPane;

//初始化所有的控件,做界面布局
private void initComponments() {
//获得ContentPane 容器,方便加入各个组件
contentPane = getContentPane();
//不设置版面控制
contentPane.setLayout(null);

//设置显示“欢迎使用学生管理系统”的控件
topic = new JLabel();
//设置JLable显示的内容
topic.setText("欢迎使用学生管理系统");
//设置JLabel显示的字体
topic.setFont(new Font("",Font.BOLD,18));
//设置JLabel摆放位置的大小
topic.setBounds(150, 100, 400, 50);
//把JLabel放入容器
contentPane.add(topic);

// 设置显示用户名的JLabel控件
name = new JLabel();
name.setText("用户名");
name.setFont(new Font("",Font.BOLD,15));
topic.setBounds(130, 180, 100, 30);
contentPane.add(name);

//设置输入用户名的文本框
userText = new JTextField();
userText.setBounds(200, 180, 150, 30);
contentPane.add(userText);

//设置显示密码的JLabel
pw = new JLabel();
pw.setText("密码");
pw.setFont(new Font("",Font.BOLD,15));
pw.setBounds(130, 230, 100, 30);
contentPane.add(pw);

//设置输入密码的密码框
pwText = new JPasswordField();
pwText.setBounds(200, 230, 100, 30);
contentPane.add(pwText);
 
//设置登录按钮
login = new JButton();
login.setText("登录");
login.setFont(new Font("",Font.BOLD,15));
login.setBounds(130, 230, 80, 30);
//按钮加入监听,有能力捕获点击事件
login.addActionListener(this);
contentPane.add(login);

//设置退出按钮
cancel = new JButton();
cancel.setText("退出");
cancel.setFont(new Font("",Font.BOLD,15));
cancel.setBounds(280, 320, 80, 30);
//按钮加入监听,有能力捕捉点击事件
cancel.addActionListener(this);
contentPane.add(cancel);

//获得屏幕大小
Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
//设置窗口最佳大小
this.setPreferredSize(new Dimension(500,500));
//把窗口放在屏幕中间
this.setBounds(screenSize.width/2-250,screenSize.height/2-250,500,500);
//设置窗口标题
this.setTitle("学生管理系统");
//设置窗口可见
this.setVisible(true);
//不可改变窗口大小
setResizable(false);
pack();

}
public static void main(String args[]) {
new LoginFrame();
//new LoginFrame().setVisible(false);
}

//捕捉到ActionEvent事件后的实现逻辑,在这里是JButton点击
public void actionPerformed(ActionEvent e){

}}