下载此文档

最好的Java俄罗斯方块源代码.doc


文档分类:IT计算机 | 页数:约10页 举报非法文档有奖
1/10
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/10 下载此文档
文档列表 文档介绍
import ; import ;
import ; import ; import ; import ; import ;
import ; import ; import ; import ; import ; import ; import ;
public class myblock extends JFrame {
private static final long serialVersionUID = 1L; public static void main(String[] args){
final JFrame frame = new JFrame("俄罗斯方块。。。"); final Tetrisblok a = new Tetrisblok();
(a);
(a);
final Timer timer = new Timer(400, TimerListener()); ();
JMenuBar menu = new JMenuBar(); (menu); //定义游戏菜单项
JMenu gameMenu = new JMenu("游戏(G)"); JMenuItem newitem = new JMenuItem("新游戏(N)"); (newitem);
final JMenuItem pauseitem = new JMenuItem("暂停(P)"); (pauseitem);
JMenuItem contitem = new JMenuItem("继续(c)"); (contitem);
JMenuItem exititem = new JMenuItem("退出(E)"); (exititem); //添加监听器来实现游戏菜单上的各个菜单项的功能,采用匿名内部类//新游戏菜单项的功能实现
(new ActionListener(){ public void actionPerformed(ActionEvent e){
();
(); = 0; =4; =-1;
=(7); =(4); =a

最好的Java俄罗斯方块源代码 来自淘豆网m.daumloan.com转载请标明出处.

相关文档 更多>>
非法内容举报中心
文档信息
  • 页数10
  • 收藏数0 收藏
  • 顶次数0
  • 上传人w447750
  • 文件大小92 KB
  • 时间2018-09-25