home *** CD-ROM | disk | FTP | other *** search
Java Source | 1996-02-08 | 578 b | 27 lines |
- import java.awt.*;
- import java.applet.*;
-
- public class Applet11 extends Applet
- {
- public void paint(Graphics g)
- {
- int row = 0;
-
- for (int x=5; x<=40; x+=5)
- {
- String s = "Loop counter = ";
- s += String.valueOf(x);
- g.drawString(s, 80, row * 15 + 15);
- ++row;
- }
-
- for (int x=40; x>=5; x-=5)
- {
- String s = "Loop counter = ";
- s += String.valueOf(x);
- g.drawString(s, 80, row * 15 + 15);
- ++row;
- }
- }
- }
-