Gauge Meters; A daunting task

Since I’m on vacation, I thought of planning my project using the free time. As the next step, I thought of developing the front end of the application. The user should be able to view the real time temperature and the power consumption. To present this information, I thought of using simple gauge meters.

Although the idea may seem to be simple, I had to spend a lot of time searching for any java libraries. Finally after many hours I found “SteelSeries”. Although the name might suggest otherwise, it’s a opensource library created for the purpose of using gauge meters effectively. I managed to learn the basics of the library from these blog posts. Using java swing, my next attempt was to create a simple program which could display the value provided by the user. However in these attempts, I found out that the jar files I had got were corrupted. After searching through many resources I found a site which provides all the libraries.

My next step was to expand the program further so that it can read a value from a text file and display the temperature and the power consumption. In this implementation, I used a thread called reader for background work. In this case, its task was to read the value from the text file and update the user interface as well as the internal calculator which would then calculate the power consumption. After several attempts, I was able to design a program which worked.

As the final step, since users are more interested in the time the last update was done, I included an update so that the date and time stamp would be included in a JLabel. The following video demonstrates my progress.

Notify of
Inline Feedbacks
View all comments