|
| |
Here's an example of the use of ThreadGroups.
This page contains two Java applets:
-
An applet that shows the JDK version your browser is
running:
|
|
|
Here's the
source
for this applet.
|
-
An applet that uses the above TestThreadGroup class to
list all the ThreadGroups
and their Threads,
and then, for good measure, lists all the applets
that are running.
|
|
|
Here's the source
for this applet
|
Note that, because of how the
browser implements its security manager, this applet
may be unsuccessful, or only partially successful.
When run in an appletviewer, it outputs something like:
|