Avatar of xcusmwah

asked on 

"Thermometer" Java Applet

I am looking for a Java applet that can read in a value of a flat file or .html document and display it graphically in a "thermometer" type applet.  The goal is to reach $150,000 so the top of the thermometer should represent that amount.  I am looking for a complete example and need it to be implemented without a database.

Avatar of undefined
Last Comment
Avatar of funnyveryfunny

Blurred text
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of funnyveryfunny

Constructor: Initialises the main frame and get filename.txt.

Paint(): At every call of this method, it loads the required image which is tracked by an index that points to filename[] array.

That is it really, go over it and you will understand. Also because each of my image has a description therefore paint() also reads a text file with the same name as image's filename, i.e image1.jpg & image1.txt.

Essentially it's an image viewer.
Avatar of John Fistere
John Fistere
Flag of United States of America image

I have the same need, that is a thermometer to show progress towards a donations goal.  I don't see how the answer provided by funnyveryfunny related to the question.  I want a simple component that I can manually set to show the progress toward a goal.  I would like to have a choice of styles.

Thank you,
John Fistere
Hi John,

I classified the original problem into two parts:

1) How does an applet access/read a file?
2) How do we demonstrate this graphically?

I answered the first part by showing how to read a file (I believed this is what the author tried to ask). With regards to the look-and-feel of the thermometer, I considered this as merely an animation that presents the data in some fancy ways. Therefore the choice of styles is upto you :-)

Avatar of John Fistere
John Fistere
Flag of United States of America image

I see.  I will re-read your comments in that light.  However, I am at a different level of web development.  What I am really looking for is a thermometer component that I can simply place on a page and set the level.

Then I suggest that you do some searches on the web or post new a question in EE's Java.

Java is a platform-independent, object-oriented programming language and run-time environment, designed to have as few implementation dependencies as possible such that developers can write one set of code across all platforms using libraries. Most devices will not run Java natively, and require a run-time component to be installed in order to execute a Java program.

Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews


IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo