代码:

/**
*
*/
package com.niit.syntronized; import java.awt.Color;
import java.awt.FlowLayout;
import java.awt.Font;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener; import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JTextField; /**
* @author: Annie
* @date:2016年6月15日
* @description: 打字母游戏(吵醒休眠线程)
*/
public class WindowTyped extends JFrame implements ActionListener,Runnable{ JTextField inputLetter;
Thread giveLetter;
JLabel showLetter,showScore;
int sleepTime,score;
Color c;
public WindowTyped() {
setLayout(new FlowLayout());
giveLetter = new Thread(this);
inputLetter = new JTextField(10);
showLetter = new JLabel(" ",JLabel.CENTER);
showScore = new JLabel("分数");
showLetter.setFont(new Font("Arial", Font.BOLD, 22));
add(new JLabel("显示字母"));
add(showLetter);
add(new JLabel("输入所显示的字母(回车)"));
add(inputLetter);
add(showScore);
inputLetter.addActionListener(this);
setBounds(100, 100, 450, 200);
setVisible(true);
validate();
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
giveLetter.start();
} @Override
public void run() {
char c = 'a';
while (true) {
showLetter.setText(""+c+" ");
c = (char) (c+1);
if(c>'z')
c='a';
try {
Thread.sleep(sleepTime);
} catch (InterruptedException e) {}
} } public void setSleepTime(int n){
this.sleepTime = n;
} @Override
public void actionPerformed(ActionEvent e) {
String s = showLetter.getText().trim();
String litter = inputLetter.getText().trim();
if(s.equals(litter)){
score++;
showScore.setText("得分"+score);
validate();
giveLetter.interrupt();
}
inputLetter.setText(null);
}
public static void main(String[] args) {
WindowTyped window = new WindowTyped();
window.setTitle("打字母游戏");
window.setSleepTime(2000); } }

效果图:

aaarticlea/png;base64,iVBORw0KGgoAAAANSUhEUgAAAboAAABkCAIAAAB/1mI5AAAgAElEQVR4Ae1dC5gcVZWu6q7uSQQFRXDywjDkA3yQx6d+S4JkN2BgQ1x11ZBo3IUFswiuMiSRh5Dlc4OIQB64+mnMho1KPpgEH4uGCAGC+MG4Kl8SeWgwJPlISEIUWB4J8+iu2v/cU3X6TlX1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4mwxgRvKiqKgCKgCCgCSQQ8h6jSDYp+EBjeVLpMgqQaRUARUATorx9d+iPIwMESM0CtmCgCioAioAikIkB/zePT16i7galTjVSpCCgCioAiQA8Q+Y5bdLIgTXzLhkvfTaRFEVAEFAFFII4APaBeBEkGWapdMKbSZRwj3VcEFAFFAAjg4fScG2ToVDzAl2yALZUu9Y2hCCgCikAKAvS34k6QCejxIT4XV7pMgUlVioAioAh4+PI2cCW+7pIYkxaXSpf6rlAEFAFFIAUBD88SBS49QESbPkeUApGqFAFFQBEgBDK4w4Pn1PGQOj2oToyplKnvDEVAEVAEUhDAH0EGxSJtBUj4Cx9lyxSUVKUIKAKKgJOhpaUf4Fs2UAxXKl/q20IRUAQUgRQEMvy3j/TnjyBLXVumQKQqRUARUAQIAfqbcTxtaR64pLviemNc3xeKgCKgCKQi4GXxm7kOniECYYI7M1nQpxZFQBFQBBSBBAJe3ssWwZJZutuTzbr4xo2EjSoUAUVAEVAEHC+fo5vjuMuDr1HHUhPfUKSoKAKKgCKgCCQR+H+5MdUMaUUgRAAAAABJRU5ErkJggg==" alt="" />

GUI线程 :打字母游戏的更多相关文章

  1. [Sciter系列] MFC下的Sciter–5.Sciter中GUI线程研究

    [Sciter系列] MFC下的Sciter–5.Sciter中GUI线程研究,目前MFC存在问题,win32没问题. 本系列文章的目的就是一步步构建出一个功能可用,接口基本完善的基于MFC框架的Sc ...

  2. 在非gui线程使用QMessageBox

    最近我写项目的时候遇到一个奇怪的需求,要在工作线程内,根据某个情况弹出一个MessageBox 但是Qt提供的MessageBox只可以在gui线程(主线程)使用,于是我就对QMessageBox封装 ...

  3. JSP简单练习-猜字母游戏

    <!-- guessCharExample.jsp --> <%@ page contentType="text/html; charset=gb2312" %& ...

  4. 猜字母游戏(Java)

    我的代码: package day20181025; import java.util.Arrays; import java.util.Scanner; /** * 猜字母 * @author Ad ...

  5. Java入门第39课——猜字母游戏之实现字母生成方法

    问题        实现猜字母游戏中的字母生成方法,即,随机生成5个不同的字母作为猜测的结果. 方案        实现generate方法,首先声明一个字符类型的数组,用于存储26个大写字母,然后声 ...

  6. Java入门第38课——猜字母游戏之设计程序结构

    问题        本案例需要实现猜字母游戏程序中的程序结构 方案        分析猜字母游戏可以看出,程序首先需要随机产生5个不同的字母作为需要猜测的结果,因此,可以先定义一个方法,以实现此功能: ...

  7. Java入门第37课——猜字母游戏之设计数据结构

    问题        有猜字母游戏,其游戏规则为:程序随机产生5个按照一定顺序排列的字符作为猜测的结果,由玩家来猜测此字符串.玩家可以猜测多次,每猜测一次,则由系统提示结果.如果猜测的完全正确,则游戏结 ...

  8. Windows中的Work线程和GUI线程

    Windows线程分为两种:Worker线程.GUI线程 worker线程:是指完全不牵扯到图形用户界面(GUI),纯粹做运算的线程. GUI线程:负责建造窗口以及处理消息循环(拥有消息队列).任何一 ...

  9. Java之线程———GUI线程(包含打字游戏和计时器俩个GUI实列)

    当java程序包含图形用户界面(GUI)时,Java虚拟机在运行应用程序时会自动启动更多的线程,其中有两个重要的线程:AWT-EventQuecue 和 AWT-Windows. AWT-EventQ ...

随机推荐

  1. NYOJ--241--字母统计

    /* Name: NYOJ--241--字母统计 Date: 18/04/17 17:12 Description: 水过,C++11特性不能用,尴尬 */ #include<bits/stdc ...

  2. akoj-1267-独木舟上的荡漾

    独木舟上的荡漾 Time Limit:1000MS  Memory Limit:65536K Total Submit:76 Accepted:44 Description 进行一次独木舟的旅行活动, ...

  3. 关于CGI:Tomcat、PHP、Perl、Python和FastCGI之间的关系

    如前文所述,Web服务器是一个很简单的东西,并不负责动态网页的构建,只能转发静态网页.同时Apache也说,他能支持perl,生成动态网页.这个支持perl,其实是apache越位了,做了一件额外的事 ...

  4. C++ Socket学习记录 -3

    WinSocket套接字之间的数据传输 在客户端和服务端建立链接后,接着就是在套接字之间传输数据. 很简单的使用 recv 接收数据,用send发送数据,单但是出现一个问题,不管接收还是发送,数据都是 ...

  5. 【Java学习笔记之二十二】解析接口在Java继承中的用法及实例分析

    一.定义 Java接口(Interface),是一系列方法的声明,是一些方法特征的集合,一个接口只有方法的特征没有方法的实现,因此这些方法可以在不同的地方被不同的类实现,而这些实现可以具有不同的行为( ...

  6. [js高手之路] dom常用节点属性兼容性详解与应用

    一.每个DOM节点都有一个nodeType属性,表示节点类型, NodeType一共有12种类型,我们可以通过遍历内置的Node构造函数获取 window.onload = function(){ v ...

  7. BTrace : Java 线上问题排查神器

    BTrace 是什么 BTrace 是检查和解决线上的问题的杀器,BTrace 可以通过编写脚本的方式,获取程序执行过程中的一切信息,并且,注意了,不用重启服务,是的,不用重启服务.写好脚本,直接用命 ...

  8. C#多线程爬虫抓取免费代理IP

    这里用到一个HTML解析辅助类:HtmlAgilityPack,如果没有网上找一个增加到库里,这个插件有很多版本,如果你开发环境是使用VS2005就2.0的类库,VS2010就使用4.0,以此类推.. ...

  9. JVM命令工具开发

    1.查看tomcat7_8080的gc状态 $ jps -v | awk '/tomcat7_8080/{print $1}' | xargs jstat -gcutil 2.查看tomcat7_80 ...

  10. BotVS趋势交易策略-MACD

    MACD低买高卖自动跟单滑动止损策略 , 基于Python实现. 交叉后前一柱指金叉后的第一柱的值, 交叉后前一柱指金叉前的最后一个柱的值, 滑动价格指下单时加的价格,比如买单会现价加上这个价格,卖单 ...