private boolean mouseIsInX(int rowStartX, int rowEndX, int mouseX) { return ((rowStartX < mouseX) && (mouseX < rowEndX)); } private boolean mouseIsInY(int rowStartY, int rowEndY, int mouseY) { return ((rowStartY < mouseY) && (mouseY < rowEndY)); } private boolean mouseIsInArea(int x1, int y1, int x2, int y2, int mouseX, int mouseY) { return (mouseIsInX(x1, x2, mouseX) && mouseIsInY(y1, y2, mouseY)); }