-
弹跳球 java
水平弹跳球例如,假设你想创建一个球跨组件旅行,开始在组件的左侧和横跨行进到右侧。要做到这一点,你必须做以下的事情:✦创建球上绘制的组件。通常情况下,该组件只需扩展JComponent的。✦创建一个线程的run方法包括一个循环。在循环中,调用睡眠法睡了一小的时间间隔(通常为10或20毫秒),然后调用绘图组件的repaint方法。简单地创建绘图组件是最简单的,因此不仅扩展JComponent的,但也实现Runnable接口。这样一来,就可以创建run方法作为绘图组件类中的一员。✦在paint方法,重新计算每个形状的位置被动画,然后绘制它。✦要获得持续的动画,创建绘图组件的一个实例并把它添加到一个帧或小程序。然后,通过这个实例中Thread类的构造函数来创建Thread对象。最后,调用Thread对象的start方法。听起来很简单?清单4-1显示第一
- 2023-07-08 12:00:04下载
- 积分:1
-
学校管理系统
学校管理系统也在协助机构在办学学术礼节性的 java 开发中生成程序它产生学生出勤列表,报告形式
- 2023-06-05 02:05:05下载
- 积分:1
-
fudu365_src
voa英语学习(英语听力)网站源码是一个广大英语学习爱好者喜欢的英语听力网站,网站以VOA英语(慢速英语)为听力学习材料,首创建英语复读模式,目前新版本已经推出了英语学习资料,英语学习经验,学习视频等实用功能,而且我们觉得voa英语复读网项目本身技术含量好,对于初学者或建站人员都有帮助,所以将项目代码免费共享给大家,网站项目的主要功能包括:
一、j2ee架构的,ssh框架组合。
二、Memcached缓存框架的使用。
三、flex英语复读机。
四、邮件发送实现。
五、文章自动抓取实现等等。(lovers of English listening English learning website, website (English) for listening to voa English learning materials, first create the English answer read mode, the new version has launched English learning materials, experience in learning English, learning the practical function such as video, and we think the voa English restudy net project itself technology content, good for beginners or site personnel have help, so the project code sharing to you for free, web project s main features include:
A, j2ee architecture, SSH framework combination.
The use of the two, Memcached cache framework.
Three, flex English repeater.
Four, mail delivery.
Five, the realization of automatic fetching articles and so on.)
- 2015-05-07 10:20:03下载
- 积分:1
-
android 安卓 java
xmpp协议开发xmpp协议开发xmpp协议开发xmpp协议开发xmpp协议开发xmpp协议开发xmpp协议开发xmpp协议开发
- 2023-03-24 13:10:03下载
- 积分:1
-
android open gl 示例代码下载
[实例简介]Open GL 入门级示例 [实例截图] [核心代码]package com.china.gltry;import javax.microedition.khronos.egl.EGL10;import javax.microedition.khronos.egl.EGL11;import javax.microedition.khronos.egl.EGLConfig;import javax.microedition.khronos.egl.EGLContext;import javax.microedition.khronos.egl.EGLDisplay;import javax.microedition.khronos.egl.EGLSurface;import javax.microedition.khronos.opengles.GL;import android.view.SurfaceHolder;/** * An EGL helper class. */public class EGLHelper{ public EGLHelper() { } /** * Initialize EGL for a given configuration spec. * @param configSpec */ public void start(int[] configSpec){ /* * Get an EGL instance */ mEgl = (EGL10) EGLContext.getEGL(); /* * Get to the default display. */ mEglDisplay = mEgl.eglGetDisplay(EGL10.EGL_DEFAULT_DISPLAY); /* * We can now initialize EGL for that display */ int[] version = new int[2]; mEgl.eglInitialize(mEglDisplay, version); EGLConfig[] configs = new EGLConfig[1]; int[] num_config = new int[1]; mEgl.eglChooseConfig(mEglDisplay, configSpec, configs, 1, num_config); mEglConfig = configs[0]; /* * Create an OpenGL ES context. This must be done only once, an * OpenGL context is a somewhat heavy object. */ mEglContext = mEgl.eglCreateContext(mEglDisplay, mEglConfig, EGL10.EGL_NO_CONTEXT, null); mEglSurface = null; } /* * Create and return an OpenGL surface */ public GL createSurface(SurfaceHolder holder) { /* * The window size has changed, so we need to create a new * surface. */ if (mEglSurface != null) { /* * Unbind and destroy the old EGL surface, if * there is one. */ mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); mEgl.eglDestroySurface(mEglDisplay, mEglSurface); } /* * Create an EGL surface we can render into. */ mEglSurface = mEgl.eglCreateWindowSurface(mEglDisplay, mEglConfig, holder, null); /* * Before we can issue GL commands, we need to make sure * the context is current and bound to a surface. */ mEgl.eglMakeCurrent(mEglDisplay, mEglSurface, mEglSurface, mEglContext); GL gl = mEglContext.getGL(); return gl; } /** * Display the current render surface. * @return false if the context has been lost. */ public boolean swap() { mEgl.eglSwapBuffers(mEglDisplay, mEglSurface); /* * Always check for EGL_CONTEXT_LOST, which means the context * and all associated data were lost (For instance because * the device went to sleep). We need to sleep until we * get a new surface. */ return mEgl.eglGetError() != EGL11.EGL_CONTEXT_LOST; } public void finish() { if (mEglSurface != null) { mEgl.eglMakeCurrent(mEglDisplay, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_SURFACE, EGL10.EGL_NO_CONTEXT); mEgl.eglDestroySurface(mEglDisplay, mEglSurface); mEglSurface = null; } if (mEglContext != null) { mEgl.eglDestroyContext(mEglDisplay, mEglContext); mEglContext = null; } if (mEglDisplay != null) { mEgl.eglTerminate(mEglDisplay); mEglDisplay = null; } } EGL10 mEgl; EGLDisplay mEglDisplay; EGLSurface mEglSurface; EGLConfig mEglConfig; EGLContext mEglContext;}
- 2015-04-06下载
- 积分:1
-
java的扫雷游戏
使用Java语言编写的扫雷小游戏程序,菜鸟级别,请大家多多指教,本程序是仿照windows的扫雷游戏界面编写的,分为简单,中等,困难,三个级别,只要练习gui界面设计,运行时直接点击Jmin.exe,也可以在dos下运行JMine.java程序
- 2023-03-14 20:20:04下载
- 积分:1
-
gd32F303实例
【实例简介】小熊派GD32学习过程中的资料和编写的代码
- 2021-06-25 00:31:12下载
- 积分:1
-
link
说明: android手机系统的游戏连连看,游戏的基本功能已经实现(the game of the android system picture matching )
- 2011-04-02 00:01:50下载
- 积分:1
-
Puzzle小游戏
利用java的swing开发。 魔板游戏:初级,中级,高级以及自定义难度; 玩法:数字玩法和图像玩法。 里面:DIY游戏行数和列数的大小;图片分隔,自定义图片的。
- 2023-05-09 01:50:04下载
- 积分:1
-
1000多种java算法大全源码包
各种java算法源码集合,包括排序、查找、哈希等等算法。是深入了解算法相当不错的资料。
- 2022-01-22 02:18:33下载
- 积分:1