I thought you said in your first post that the width is 150 and health is 100?
I want to keep the health bar at a width of 150 but my health is 100.
Try something like:
int maxHealth, currentHealth, barWidth;
maxHealth = 150;
barWidth = 100;
float ratio = currentHealth/maxHealth;
g.fillRect(211, 6, (int)(ratio*barWidth), barHeight);
Basically, what you want is to get the ratio of the player's current health against his maximum health and multiply that to the width of the bar.
So if the player has 75 health remaining for example, the width of your bar should be: