home *** CD-ROM | disk | FTP | other *** search
- import java.applet.Applet;
- import java.awt.Component;
- import java.awt.Event;
- import java.awt.Font;
- import java.awt.Graphics;
-
- public class NervousText extends Applet implements Runnable {
- char[] separated;
- // $FF: renamed from: s java.lang.String
- String field_0;
- Thread killme;
- // $FF: renamed from: i int
- int field_1;
- int x_coord;
- int y_coord;
- String num;
- int speed = 35;
- int counter;
- boolean threadSuspended;
-
- public void start() {
- if (this.killme == null) {
- this.killme = new Thread(this);
- this.killme.start();
- }
-
- }
-
- public void stop() {
- this.killme = null;
- }
-
- public boolean mouseDown(Event evt, int x, int y) {
- if (this.threadSuspended) {
- this.killme.resume();
- } else {
- this.killme.suspend();
- }
-
- this.threadSuspended = !this.threadSuspended;
- return true;
- }
-
- public void run() {
- for(; this.killme != null; ((Component)this).repaint()) {
- try {
- Thread.sleep(100L);
- } catch (InterruptedException var2) {
- }
- }
-
- this.killme = null;
- }
-
- public void init() {
- this.field_0 = ((Applet)this).getParameter("text");
- if (this.field_0 == null) {
- this.field_0 = "HotJava";
- }
-
- this.separated = new char[this.field_0.length()];
- this.field_0.getChars(0, this.field_0.length(), this.separated, 0);
- ((Applet)this).resize(150, 50);
- ((Component)this).setFont(new Font("TimesRoman", 1, 36));
- }
-
- public void paint(Graphics g) {
- for(this.field_1 = 0; this.field_1 < this.field_0.length(); ++this.field_1) {
- this.x_coord = (int)(Math.random() * (double)10.0F + (double)(15 * this.field_1));
- this.y_coord = (int)(Math.random() * (double)10.0F + (double)36.0F);
- g.drawChars(this.separated, this.field_1, 1, this.x_coord, this.y_coord);
- }
-
- }
- }
-