Your code fragment, while full of cruft, is not fundamentally broken. However, I can only guess what the rest of you program is doing or even where/when you are calling this code from. I could guess that you call this code several times and lay one layout over another... but it's only a WAG. Produce a simple, complete program that demonstrates the problem and post it.