/** * Constructs an AbstractButtonPanelBuilder * for the given FormLayout and layout container. * * @param layout the FormLayout to use * @param container the layout container * * @throws NullPointerException if {@code layout} or {@code container} is {@code null} */ protected AbstractButtonPanelBuilder(FormLayout layout, JPanel container) { super(layout, container); setOpaque(false); ComponentOrientation orientation = container.getComponentOrientation(); leftToRight = orientation.isLeftToRight() || !orientation.isHorizontal(); }