Class RowLayout

  • All Implemented Interfaces:
    java.awt.LayoutManager

    public class RowLayout
    extends java.lang.Object
    implements java.awt.LayoutManager
    This layout arranges components in rows, putting as many components as possible on a row and using as many rows as necessary.
    • Constructor Summary

      Constructors 
      Constructor Description
      RowLayout​(int hgap, int vgap, int preferredNumRows)
      Constructs a new RowLayout
    • Constructor Detail

      • RowLayout

        public RowLayout​(int hgap,
                         int vgap,
                         int preferredNumRows)
        Constructs a new RowLayout
        Parameters:
        hgap - the gap (in pixels) between columns
        vgap - the gap (in pixels) between rows
        preferredNumRows - the prefered number of rows to use in the layout.
    • Method Detail

      • addLayoutComponent

        public void addLayoutComponent​(java.lang.String name,
                                       java.awt.Component comp)
        Specified by:
        addLayoutComponent in interface java.awt.LayoutManager
        See Also:
        LayoutManager.addLayoutComponent(String, Component)
      • removeLayoutComponent

        public void removeLayoutComponent​(java.awt.Component comp)
        Specified by:
        removeLayoutComponent in interface java.awt.LayoutManager
        See Also:
        LayoutManager.removeLayoutComponent(Component)
      • preferredLayoutSize

        public java.awt.Dimension preferredLayoutSize​(java.awt.Container parent)
        Specified by:
        preferredLayoutSize in interface java.awt.LayoutManager
        See Also:
        LayoutManager.preferredLayoutSize(Container)
      • minimumLayoutSize

        public java.awt.Dimension minimumLayoutSize​(java.awt.Container parent)
        Specified by:
        minimumLayoutSize in interface java.awt.LayoutManager
        See Also:
        LayoutManager.minimumLayoutSize(Container)
      • layoutContainer

        public void layoutContainer​(java.awt.Container parent)
        Specified by:
        layoutContainer in interface java.awt.LayoutManager
        See Also:
        LayoutManager.layoutContainer(Container)