日期:2014-05-20 浏览次数:21001 次
public UI() {
		setTitle("马周游问题");
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(0, 0, 490, 410);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		contentPane.setBackground(Color.WHITE);
		contentPane.setBounds(0, 0, 490, 410);
		width = contentPane.getWidth();
		height = contentPane.getHeight();
		dLine.draw(contentPane,width,height);//为什么这句会抛出空指针异常啊·经检验和第一个参数有关,为什么?
	}