In Swing GUI i need to show an image which will indicates the Liquid level of the tank on the basis of dynamic data.It would be like a tank image which will show the liquid which is having.How can i draw liquid level?
Asked
Active
Viewed 1,406 times
0
-
4*"How can i do this in swing.."* Which part? Load an image? Display it in a panel or label? Draw the fluid level? Doing it dynamically? *"..with Netbeans IDE?"* The same way you'd do it in Eclipse or an app. written in a text editor. – Andrew Thompson Dec 09 '11 at 07:51
3 Answers
2
Also consider JFreeChart
, which includes DialPlot
and ThermometerPlot
, shown here. The latter is designed for temperature, but it illustrates liquid levels well.
1
You may want to use a progress bar. Read: http://docs.oracle.com/javase/tutorial/uiswing/components/progress.html
You can do a setOrientation() method to make it vertical.

thotheolh
- 7,040
- 7
- 33
- 49