home *** CD-ROM | disk | FTP | other *** search
Java Source | 1998-06-03 | 1.7 KB | 79 lines | [TEXT/CWIE] |
- /*
- Scrolling Text JAVA Applet
- =====================
-
- ⌐ 1997 by Christoph Schaffhauser
- cschaffhauser@datacomm.ch
- http://www.datacomm.ch/darkeagl/
-
- The only conditions are that you do not alter it, manipulate or deconstruct it and
- if you want to use this applet in you homepage, you have to make a link from your homepage
- to my homepage: http://www.datacomm.ch/darkeagl/
-
- Thanks Chris
-
- B.T.W: I'm addicted to emails.... If you have some time write me a small note :-)
- */
-
- import java.util.*;
- import java.awt.*;
- import java.applet.*;
- import java.awt.Font;
- import java.awt.Graphics;
-
- public class ScrollText extends Applet implements Runnable {
- Thread killme = null;
-
- Color white = new Color(255,255,255);
- Color gray = new Color(166,166,166);
- Color lightgray = new Color(240,240,240);
- Color darkgray = new Color(207,207,207);
- Color middlegray = new Color(222,222,222);
- Color darkgreen = new Color( 10,43, 10);
- Color black = new Color( 0,0, 0);
- Color yellow = new Color( 255,255, 0);
- Color green = new Color( 0,255, 0);
- Color orange = new Color( 255,128, 0);
- Color red = new Color( 255,63, 63);
-
- public String getAppletInfo() {
- return "Scrolling Text by Christoph Schaffhauser";
- }
-
- public void init()
- {
- }
-
- public void paint (Graphics g)
- {
- }
-
- public boolean mouseUp (Event evt, int x, int y)
- {
- return true;
- }
-
- public void start() {
- if(killme == null)
- {
- killme = new Thread(this);
- killme.start();
- }
- }
-
- public void stop() {
- killme = null;
- }
-
- public void run() {
- Graphics g = getGraphics();
-
- while (killme != null) {
- try {Thread.sleep(1000);} catch (InterruptedException e){}
-
- }
- killme = null;
- }
-
-
- }