读书人

Eclipse Console中显示“没有配置文件

发布时间: 2012-01-22 22:38:43 作者: rapoo

Eclipse Console中显示“没有配置文件”
我想可能是Java配置的问题。
做的是 传智播客_俄罗斯方块游戏03_使用API类组装游戏。
代码:
package cn.itcast;

import javax.swing.JFrame;

import cn.itcast.tetris.controller.Controller;
import cn.itcast.tetris.entities.Ground;
import cn.itcast.tetris.entities.ShapeFactory;
import cn.itcast.tetris.view.GamePanel;

public class Game {

/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
ShapeFactory shapeFactory=new ShapeFactory();
Ground ground=new Ground();
GamePanel gamePanel=new GamePanel();

Controller controller=new Controller(
shapeFactory,ground,gamePanel);

JFrame frame=new JFrame();
frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frame.setSize(gamePanel.getSize().width,
gamePanel.getSize().height);
frame.add(gamePanel);
gamePanel.addKeyListener(controller);
gamePanel.setVisible(true);

controller.newGame();
}

}
多谢大家!!!

[解决办法]
不是说你导的有问题,
1.可能是这些类本身的问题
2.你的用法的问题。

读书人网 >Eclipse开发

热点推荐