Skip to Main Content
Java
book

Java

by Michael Sikora
January 2003
Beginner to intermediate content levelBeginner to intermediate
150 pages
7h 28m
English
Morgan Kaufmann
Content preview from Java
164
Chapter 10: Threads []
24
25
26
27
28
29
30
31
32
33
34
35
repaint () ;
public void paint(Graphics g) {
g.drawString(text, xpos, ypos) ;
}
public void stop() {
numbersThread = null;
}
ThreadForEver
The code for the corresponding HTML page, ThreadYorEver.html, can be found on the
book's Web site. The applet implements a Runnable interface in the same manner as a finite
applet thread. There is also no change to the applet start method. However, instead of a finite
for loop in the run method, we specify the following while loop (line 18):
while (numbersThread != null) {
As long as the thread is not stopped, this condition ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

JAVA Programming

JAVA Programming

K. Rajkumar
Java Programming

Java Programming

Poornachandra Sarang
Java Programming

Java Programming

Hari Mohan Pandey
Java 9 for Programmers

Java 9 for Programmers

Paul J. Deitel, Harvey Deitel

Publisher Resources

ISBN: 9781558609099