Progress Bar used as Health Bar

僤鯓⒐⒋嵵緔 提交于 2019-12-01 23:22:00

问题


I am making a java game that has a sidebar that displays a player's health. I want the bar to be like a progress bar which is along the lines of the picture below:

Would a progress bar be capable enough to accomplish this? If not, what will?


回答1:


If you want an "official" answer, then yes, a JProgressBar can do this easily. I suggest that you give it a try and let us know how it works out, especially if you have any problems with it.



来源:https://stackoverflow.com/questions/10468267/progress-bar-used-as-health-bar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!