吃了可以加血的血块类import java.awt.*;public class Blood { //血块移动的路径 int[][] pos = { {450,250},{450,252},{450,254},{450,256},{450,258},{450,260}, {450,310},{452,300},{454,300},{456,300},{458,300},{460,300} }; int x,y,w,h; TankClient tc; int step = 0; private ... Read More
posted @ 2014-02-24 11:26
梦醒心晴
Views(398)
Comments(0)
Diggs(0)
主界面import java.awt.BorderLayout;import java.awt.Color;import java.awt.Container;import java.awt.Graphics;import java.awt.Toolkit;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.event.MouseEvent;import java.awt.event.MouseListener;import java.awt.image.BufferedI Read More
posted @ 2014-02-24 11:10
梦醒心晴
Views(1205)
Comments(0)
Diggs(0)
主要的蛇的类import java.awt.Color;import java.awt.Graphics;import java.awt.HeadlessException;import java.awt.Rectangle;import java.awt.event.KeyEvent;import java.util.Random;public class Snake { private Node head = null; private Node tail = null; int size = 0; private boolean live = true; ... Read More
posted @ 2014-02-24 11:02
梦醒心晴
Views(373)
Comments(0)
Diggs(1)
当年学数据结构,正好java也刚刚学会gui编程,就想着结合起来做个小东西,然后这个自动走路的小球就出来了。一个方向的枚举Dir.javapublic enum Dir { L,U,R,D}结束标志EndFlag.javaimport java.awt.Color;import java.awt.Graphics;import java.util.Random;public class EndFlag implements MyDraw{ private int row,col; private Random random = new Random(); private... Read More
posted @ 2014-02-24 10:51
梦醒心晴
Views(486)
Comments(0)
Diggs(0)
一个简单的文件内容查询的小工具,没有用多线程,感觉效率非常低,但还是发出来大家一起看看吧!有改进意见了跟我说下,谢谢了!using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;using System.Text.RegularExpressions;using Syste Read More
posted @ 2014-02-24 10:30
梦醒心晴
Views(333)
Comments(0)
Diggs(0)
从网上找的源码很不齐全,自己补充了一下,有兴趣的可以看看。首先是建立一个hook类WFChangeKeyusing System;using System.Reflection;using System.Runtime.InteropServices;using System.Windows.Forms;namespace WFChangeKey{ class KeyboardHook { private const int WM_KEYDOWN = 0x100;//按下消息 private const int WM_KEYUP = 0x101;//松开... Read More
posted @ 2014-02-24 10:22
梦醒心晴
Views(966)
Comments(1)
Diggs(2)

浙公网安备 33010602011771号