资源简介
能够显示实现1800-2100年的日期,包含公历、农历、星期、二十四节气。能够显示系统时间。能够设置闹钟,能够查询若干国际大城市分布在不同时区的时间。
代码片段和文件信息
package myCalendar;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;
import java.util.Calendar;
import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.SourceDataLine;
import javax.swing.Jframe;
import javax.swing.JLabel;
import javax.swing.border.titledBorder;
public class Alarm extends Jframe implements ActionListener{
/**
* 变量-->小时
*/
private String h;
/**
* 变量-->分钟
*/
private String m;
/**
* 变量-->秒
*/
private String s;
/**
* 时
*/
private javax.swing.JComboBox dorp_down_hours;
/**
* 分
*/
private javax.swing.JComboBox dorp_down_minute;
/**
* 秒
*/
private javax.swing.JComboBox drop_down_second;
int x_size y_size;
public Alarm(){
this.setLayout(null);
dorp_down_hours = new javax.swing.JComboBox();
dorp_down_minute = new javax.swing.JComboBox();
drop_down_second = new javax.swing.JComboBox();
dorp_down_hours.setModel(new javax.swing.DefaultComboBoxModel(
new String[] { “关闭“ “00“ “01“ “02“ “03“ “04“ “05“ “06“
“07“ “08“ “09“ “10“ “11“ “12“ “13“ “14“ “15“
“16“ “17“ “18“ “19“ “20“ “21“ “22“ “23“ }));
dorp_down_hours.setName(“dorp_down_hours“); // NOI18N
dorp_down_hours.addActionListener(this);
dorp_down_hours.setBounds(10505030);
this.add(dorp_down_hours);
JLabel j1=new JLabel(“时“);
j1.setBounds(10205030);
this.add(j1);
dorp_down_minute.setModel(new javax.swing.DefaultComboBoxModel(
new String[] { “关闭“ “00“ “01“ “02“ “03“ “04“ “05“ “06“
“07“ “08“ “09“ “10“ “11“ “12“ “13“ “14“ “15“
“16“ “17“ “18“ “19“ “20“ “21“ “22“ “23“ “24“
“25“ “26“ “27“ “28“ “29“ “30“ “31“ “32“ “33“
“34“ “35“ “36“ “37“ “38“ “39“ “40“ “41“ “42“
“43“ “44“ “45“ “46“ “47“ “48“ “49“ “50“ “51“
“52“ “53“ “54“ “55“ “56“ “57“ “58“ “59“ }));
dorp_down_minute.setName(“dorp_down_minute“); // NOI18N
dorp_down_minute.addActionListener(this);
dorp_down_minute.setBounds(80505030);
this.add(dorp_down_minute);
JLabel j2=new JLabel(“分“);
j2.setBounds(80205030);
this.add(j2);
drop_down_second.setModel(new javax.swing.DefaultComboBoxModel(
new String[] { “关闭“ “00“ “01“ “02“ “03“ “04“ “05“ “06“
“07“ “08“ “09“ “10“ “11“ “12“ “13“ “14“ “15“
“16“ “17“ “18“ “19“ “20“ “21“ “22“ “23“ “24“
“25“ “26“ “27“ “28“ “29“ “30“ “31“ “32“ “33“
“34“ “35“ “36“ “37“ “38“ “39“ “40“ “41“ “42“
“43“ “44“ “45“ “46“ “47“ “48“ “49“ “50“ “51“
“52“ “53“ “54“ “55“ “56“ “57“ “58“ “59“ }));
drop_down_second.setName(“drop_down_second“); //
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2020-06-23 20:46 project2\
文件 301 2020-06-23 20:46 project2\.classpath
文件 384 2020-06-23 20:46 project2\.project
目录 0 2020-06-23 20:46 project2\.settings\
文件 598 2020-06-23 20:46 project2\.settings\org.eclipse.jdt.core.prefs
目录 0 2020-06-26 22:12 project2\bin\
目录 0 2020-06-26 20:51 project2\bin\image\
文件 2900012 2020-06-26 20:51 project2\bin\image\alarm0.wav
目录 0 2020-06-26 22:12 project2\bin\myCalendar\
文件 784 2020-06-26 21:49 project2\bin\myCalendar\Alarm$1.class
文件 5513 2020-06-26 21:49 project2\bin\myCalendar\Alarm.class
文件 2279 2020-06-26 21:21 project2\bin\myCalendar\AlarmSound.class
文件 2015 2020-06-25 17:52 project2\bin\myCalendar\Clock.class
文件 2691 2020-06-26 22:10 project2\bin\myCalendar\ClockCanvas.class
文件 7066 2020-06-25 17:52 project2\bin\myCalendar\Lunar.class
文件 1433 2020-06-26 22:12 project2\bin\myCalendar\Mainfr
文件 676 2020-06-26 22:12 project2\bin\myCalendar\Mainfr
文件 752 2020-06-26 22:12 project2\bin\myCalendar\Mainfr
文件 1088 2020-06-26 22:12 project2\bin\myCalendar\Mainfr
文件 6874 2020-06-26 22:12 project2\bin\myCalendar\Mainfr
文件 2342 2020-06-26 22:12 project2\bin\myCalendar\SolarTerm$SolarTermsEnum.class
文件 7523 2020-06-26 22:12 project2\bin\myCalendar\SolarTerm.class
文件 490 2020-06-26 22:07 project2\bin\myCalendar\Test.class
文件 706 2020-06-26 22:10 project2\bin\myCalendar\TimerTestfr
文件 1711 2020-06-26 22:10 project2\bin\myCalendar\TimerTestfr
目录 0 2020-06-26 22:12 project2\src\
目录 0 2020-06-26 20:51 project2\src\image\
文件 2900012 2020-06-26 20:51 project2\src\image\alarm0.wav
目录 0 2020-06-26 22:12 project2\src\myCalendar\
文件 6353 2020-06-26 21:49 project2\src\myCalendar\Alarm.java
文件 1466 2020-06-26 21:21 project2\src\myCalendar\AlarmSound.java
............此处省略7个文件信息
评论
共有 条评论