Creating a scale; problem with for- / if-statement

I would like to draw a scale, ranging from 0 to 700; this works pretty well:

privatestaticfinalint SIZE = 20;

privateint tickHeight = 8;

(...)

for (int i = 0; i < 700; i += 10){

g2.drawLine(i, SIZE, i, SIZE - tickHeight);

}

Now I would like to draw every 100. tick higher, say 12px. Unfortunately I don't find the correct solution :( I have to write an if statement saying something likeif (i = (100, 200, ...)) tickHeight = 12;

How can I do this in Java?

Thanks for your help!

[899 byte] By [SFLa] at [2007-11-26 18:55:51]
# 1
You want to check if i is divisible by 100. Use the remainder operator for that. http://java.sun.com/docs/books/tutorial/java/nutsandbolts/op1.html
jverda at 2007-7-9 20:34:27 > top of Java-index,Java Essentials,Java Programming...
# 2
You were thinking this I think:if(i == 100 || i == 200 || ...)But this will give you what you want:if(i % 100 == 0)
CaptainMorgan08a at 2007-7-9 20:34:27 > top of Java-index,Java Essentials,Java Programming...
# 3
> But this will give you what you want:> if(i % 100 == 0)omg, I should take a break... :)
SFLa at 2007-7-9 20:34:27 > top of Java-index,Java Essentials,Java Programming...