home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Java by Example
/
jbecd.bin
/
JBE-CD
/
NTUsers
/
JBECODE.ZIP
/
JavaByExample
/
chap13
/
Applet18.java
< prev
next >
Wrap
Text File
|
1996-02-13
|
551b
|
27 lines
import java.awt.*;
import java.applet.*;
public class Applet18 extends Applet
{
int table[][];
public void init()
{
table = new int[6][8];
for (int x=0; x<6; ++x)
for (int y=0; y<8; ++y)
table[x][y] = x+y*6;
}
public void paint(Graphics g)
{
for (int x=0; x<6; ++x)
for (int y=0; y<8; ++y)
{
String s = String.valueOf(table[x][y]);
g.drawString(s, 50+x*25, 50+y*15);
}
}
}