Fixes issue with the isPositionValid function.
@@ -202,11 +202,11 @@ public class Component {
* Whether or not the specified position is within the bounds of the component.
*/
public boolean isPositionValid(final int columnIndex, final int rowIndex) {
- if (rowIndex < 0 || rowIndex > boundingBox.getHeight()) {
+ if (rowIndex < 0 || rowIndex > boundingBox.getHeight() - 1) {
return false;
}
- if (columnIndex < 0 || columnIndex > boundingBox.getWidth()) {
+ if (columnIndex < 0 || columnIndex > boundingBox.getWidth() - 1) {
return false;
}
