private int getFill(JComponent component, boolean fillVertically) {
    if (fillVertically) {
      return BOTH;
    }
    return getFill(component);
  }
private int getFill(JComponent component, boolean fillVertically)