登录
首页 » Java » 时钟 走动

时钟 走动

于 2020-06-19 发布 文件大小:19KB
0 130
下载积分: 1 下载次数: 0

代码说明:

  一个应用线程实现指针运动的指针时钟程序。程序应用绘制函数时钟面板,根据线程休眠时间间隔,每隔1000ms进行一次重绘。程序通过获取系统时间函数并加以计算个指针位置,再利用绘制函数将其绘制在面板上,通过设置指针长度及颜色,实现时针、分针、秒针的区分。次外,通过获取窗体大小,设置圆面圆心坐标及半径,可依据窗口大小动态划分圆面大小,并动态绘制刻度点位置。(A pointer clock program that uses threads to implement pointer movement. The program draws the function clock panel and redraws it every 1000ms according to the interval of thread dormancy. The program obtains the system time function and calculates the position of a pointer, then draws it on the panel by drawing function. By setting the length and color of the pointer, it achieves the distinction of clockwise, minute and secondhand. Secondly, by acquiring the size of the form and setting the coordinates and radius of the circle center, the circle size can be dynamically divided according to the size of the window, and the location of the scale points can be dynamically plotted.)

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • graphics
    实验一:类与对象实验: 几何图形类的设计 实验目的:掌握用类进行面向对象程序设计的方法,掌握使用对象作为类的成员变量,掌握方法的参数传递,掌握静态域和静态方法。 实验内容:编写4个类:Rectangle、Circle、Geometry、Exa,具体要求如下: ① Rectangle类有double型成员变量表示矩形左上角的位置坐标及矩形的宽和高,要求提供修改和返回各成员变量的方法。 ② Circle类有double型成员变量表示圆心坐标和圆的半径,要求提供修改和返回各成员变量的方法。 ③ Geometry类有Rectangle类和Circle型的成员变量rect和circle。即Geometry类创建的对象由一个矩形和一个圆组合而成。要求该类提供修改rect、circle位置和大小的方法;提供显示rect和circle位置关系的方法,并能够显示圆是否完全坐落于矩形中。 ④ 要求能对创建的Rectangle类和Circle类对象数目进行统计。 Exa类含有main方法,在main方法中用Geometry类创建对象,该对象调用相应的方法 设置圆和矩形的位置及大小并输出圆是否包含在矩形中。输出当前Rectangle和Circle 对象数目。 (test one)
    2014-05-05 08:37:25下载
    积分:1
  • ShutterButton
    ShutterButton extends ImageView Source Code for Andriod.
    2014-02-18 14:16:27下载
    积分:1
  • Elevator
    电梯调度程序程序(模拟电梯的运行,使用Java语言绘制界面,具体说明请见压缩包里的电梯调度程序设计方案报告)(Elevator scheduler program (simulated elevator operation, drawing interface using the Java language, see the specific instructions compression elevator design report scheduler bag))
    2020-06-29 01:00:02下载
    积分:1
  • Policy
    Answers a Policy object with the specified type and the specified parameter.
    2013-11-26 15:04:56下载
    积分:1
  • math-cordic
    Testing left-associativity of the + operator.
    2014-02-11 10:46:20下载
    积分:1
  • OASystem
    本代码只是简单实现了办公系统的一小部分,使用struts等框架,只适合初学者参考。(This code simply implements a small part of office systems, such as using the struts framework, reference is only suitable for beginners.)
    2011-09-11 17:33:11下载
    积分:1
  • ne-ba-ja
    net banking project g
    2014-02-18 13:22:29下载
    积分:1
  • guangxi
    一个简单的使用Spring框架实现MVC的例子(use a simple framework for achieving Spring MVC example)
    2007-03-14 08:50:07下载
    积分:1
  • java_pic
    使用java技术操作图片,文字,可以给图片加水印等功能(Using java technology operating picture, text, you can add watermarks and other features to the picture)
    2015-08-29 10:44:25下载
    积分:1
  • Beetl2.4 使用说明书 使用说明书 20160614
    说明:  beetl是新一代模板引擎,比常见的Java服务端模板引擎都优秀(Beetl is a new generation of template engines, better than the common Java server-side template engines)
    2020-06-22 07:20:01下载
    积分:1
  • 696518资源总数
  • 106161会员总数
  • 5今日下载