public void adjustHeight(int rowsOnScreen, int totalRows) { this.setHeight((int)(this.maxHeight * (1.0f * rowsOnScreen / totalRows))); }