Basic HTML version of Foils prepared May 12 1996

Foil 102 ColorSwirl -- An Example from Teach Yourself Java in 21 Days - paint and update

From CRPC Lectures on Java Language Applets Graphics CRPC Annual Meeting Tutorial -- May 14,1996. by Geoffrey C. Fox


1 public void stop () {
  • if (runThread != null) {
2 runThread.stop();
3 runThread = null;
  • }
4 }
5 public void paint(Graphic g) {
6 g.setFont(f);
7 g.drawString ("All the Swirly Colors", 15,50);
8 }
9 public void update(Graphics g) {
10 paint(g); } // No need to clear background as unchanged! -- only color of letters changes
11 } // end Applet ColorSwirl

in Table To:


Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Dec 14 1997