I know this is probably too late, but it looks like you're reading your vertical coordinates wrong. In Java user interfaces (as in most), positive is down and negative is up. Thus, you just need to change the line I've hilighted:
Code:
private void drawThermometer(Graphics bar) {
bar.setColor(Color.red);
bar.drawRect(40,40,43,220);
bar.fillRect(40,40+220-(sliderValue*2),44,sliderValue * 2);
bar.fillArc(40,235,44,50,360,-180);
bar.drawString("20", 22,220);
bar.drawLine(37,220,40,220);
bar.drawString("40", 22,180);
bar.drawLine(37,180,40,180);
bar.drawString("60", 22, 140);
bar.drawLine(37,140,40,140);
bar.drawString("80", 22, 100);
bar.drawLine(37,100,40,100);
bar.drawString("100", 15, 60);
bar.drawLine(37,60,40,60);
}
Bookmarks