?? blinkingtext.java
字號:
/* * File: BlinkingText.java * * Makes a graphic "WAIT" indicator while sending and computing data. * * version 1.02 v1a * Copyright 1998, 1999 by Hush Communications Corporation, BWI */package hushcode;import java.awt.*;final class BlinkingText extends Thread{ Graphics gg; int xx; int yy; Color ffg; Color bbg; Font f = new Font("Helvetica",Font.BOLD,10); public BlinkingText(Graphics g, int x, int y, Color fg, Color bg) { xx = x; yy = y; gg = g; ffg = fg; bbg = bg; } public void startBlink() { start(); } public void run() { char[] w = "wait".toCharArray(); for (;;) { gg.setColor(ffg); gg.drawChars(w,0,1,xx,yy); gg.drawChars(w,1,1,xx+10,yy); gg.drawChars(w,2,1,xx+18,yy); gg.drawChars(w,3,1,xx+23,yy); try {Thread.sleep(500);} catch (InterruptedException e) {} gg.setColor(bbg); gg.fillRect(xx,yy-11,30,13); try {Thread.sleep(400);} catch (InterruptedException e) {} } } public void stopBlink() { gg.setColor(bbg); gg.fillRect(xx,yy-11,30,13); stop(); }} // end BlinkingVerticalText
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -