Class Panels


  • public class Panels
    extends java.lang.Object
    Utility class for quickly bunching up components in a panel, arranged in a particular pattern
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Panels()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Panel grid​(int columns, Component... components)
      Creates a new Panel with a GridLayout layout manager and adds all the components passed in
      static Panel horizontal​(Component... components)
      Creates a new Panel with a LinearLayout layout manager in horizontal mode and adds all the components passed in
      static Panel vertical​(Component... components)
      Creates a new Panel with a LinearLayout layout manager in vertical mode and adds all the components passed in
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Panels

        private Panels()
    • Method Detail

      • horizontal

        public static Panel horizontal​(Component... components)
        Creates a new Panel with a LinearLayout layout manager in horizontal mode and adds all the components passed in
        Parameters:
        components - Components to be added to the new Panel, in order
        Returns:
        The new Panel
      • vertical

        public static Panel vertical​(Component... components)
        Creates a new Panel with a LinearLayout layout manager in vertical mode and adds all the components passed in
        Parameters:
        components - Components to be added to the new Panel, in order
        Returns:
        The new Panel
      • grid

        public static Panel grid​(int columns,
                                 Component... components)
        Creates a new Panel with a GridLayout layout manager and adds all the components passed in
        Parameters:
        columns - Number of columns in the grid
        components - Components to be added to the new Panel, in order
        Returns:
        The new Panel