您的位置:寻梦网首页编程乐园Java天地Core JavaJava Lecture Notes

Introduction

Content

Apply

Reflect

Extend

previous.gif
 (3087 bytes)

next.gif
 (2959 bytes)

 

Content Index

Content Page # 19

The "BallWorld" class - version 3

To make our ball move several times, we can simply change the test we perform in the "paint" method. By changing the test to:

if( counter < 10 )

the application will continue to move and repaint myBall 10 times, rather than just once.

The full source file for "BallWorld.java - version 3" is available for viewing (and can be opened in the Kawa editor).

Perform activity 4 – Compilation and running of "BallWorld.java" - version 3

Back to top

basicline.gif (169 bytes)

RITSEC - Global Campus
Copyright ?1999 RITSEC- Middlesex University. All rights reserved.
webmaster@globalcampus.com.eg