Welcome to the Financial Portfolio Page
This page demonstrates how you could use applets
to track the value of a few stocks.
The applets on this page use pretend data,
since our stock and closed caption servers are unavailable outside of Sun.
The stock data is taken from a snapshot of the stock market activity on
December 8, 1995.
There is now an indepth explanation of how these
applets work with pointers to the source code.
Note:
The applets in this page work only in viewers and browsers which support
version 1.0 of the Java(tm) Programming Language.
The first applet is a stock ticker.
It shows new quotes in green and old quotes in white.
The source for this applet uses the
StockTicker,
StockStreamParser, and
StockWatcher classes.
If you want to keep better track of a stock,
you might use a graph showing some historical quotes.
These applets could connect (via a URL) to an HTTP server
that keeps a database of stock quotes if one were configured
to return the stock quote information in the appropriate format.
The NEATO quotes shown below are randomly faked every 5 seconds.
The source for this applet uses the
QuoteChart,
StockStreamParser, and
StockWatcher classes.
Finally, here's an applet that lets you check out the latest news --
as you might want to do when you see fluctuations in the marketplace.
This applet could connect (via a URL) to an HTTP server that was
monitoring the closed captioning information on a TV news station.
Here it is simply displaying the contents of a static file, since
we do not have permission to broadcast closed caption information
outside of Sun.
The source for this applet uses the
ClosedCaption
class.
Questions?
Please read the explanation page for
these applets, and note that these applets were developed as a demonstration
of Java capabilities. Sun has no plans to enhance or market these applets
but permission is granted to use them as a starting point for a stock
quote service, provided such service is made available free of charge.
If you need help modifying these applets to work with an existing stock
service, the best resources would be the
comp.lang.java
newsgroup or the
java-interest
mailing list.
These applets developed by
Jim Graham
(Flar@bendenweyr.Eng.Sun.COM)