j2meshouji
public class WelcomForm extends Canvas implements CommandListener { Image img1; Command gocmd; Timer time=new Timer(); Font f; int y; public WelcomForm() { setTitle("欢迎界面"); try{ img1=Image.createImage("/_home_8.png"); }catch(IOException e) { System.out.println("找不到图片");} y=getHeight()/2-img1.getHeight()/2; // Ticker t=new Ticker f= Font.getFont(Font.FACE_SYSTEM,Font.STYLE_BOLD|Font.STYLE_ITALIC,Font.SIZE_MEDIUM); gocmd=new Command("进入",Command.OK,1); this.addCommand(gocmd); this.setCommandListener(this); time.schedule(new TimerTask() { public void run() { repaint(); y=y+5; if(y>getHeight()) { time.cancel(); MainClass.mainDis.showMain(); } } },0,150); } public void paint(Graphics g) { int Width=this.getWidth(); int height=this.getHeight(); g.setClip(0, y, Width, 5);
- 粉丝: 20
- 资源: 3
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助