This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
It's hard to understand your code as I have no idea what the GCompound class is. Also please don't use all upper case letters for variables, they are only for constants ie those declared as final static.
If you are successfully generating a right angle triangle then your problem is when you draw the next row your offset is wrong. You need to offset each new rows start position by half the width of a single brick. This is because each row has one less brick than the row below it, so to centre a row relative to the previous one you need to take off half a brick width at each end .
Joined: Feb 01, 2012
Thanks for the suggestion will try to do that.
The GCompound is part of acm package that belongs to GObject .