Project: SWT
Bug 168314 Snippet 252 a bit confusing
Reported: 2006-12-16 02:52:34 | Status: resolved fixed

Snippet 252 (the one posted on the N&N for M4) sets a line width of 1/2. Since these are both integers, it does the division first and then the cast. This sets the line style to 0.0. I assume (since the N&N says something about fractional line width) you meant 1/2f.

Files changed in fix:
examples/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet252.java