Aligning JGo Objects


How do we align when we select mulitple objects and try to

  1. Align to the left using the left most object as an anchor.
  2. Align to the right using the right most object as an anchor
    Is there a method to find the leftmost and rightmost objects in a selection of obkects?


You’ll need to iterate through the selection to find the one with the smallest getLeft() value, or the one with the largest getLeft()+getWidth() value.