I just added a new class LayoutMath that contains some static methods to do "bounded arithmetic". If the sum of two ints is larger than Int32.MaxValue it just bounds it to MaxValue.
I changed GridLayoutManager and BorderLayoutManager to use these new methods.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I just added a new class LayoutMath that contains some static methods to do "bounded arithmetic". If the sum of two ints is larger than Int32.MaxValue it just bounds it to MaxValue.
I changed GridLayoutManager and BorderLayoutManager to use these new methods.