blinkingtext.java

来自「一个木马程序源码」· Java 代码 · 共 72 行

JAVA
72 行
字号
/* *   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 + =
减小字号Ctrl + -
显示快捷键?