private void initializeColAndRowComponentLists() {
        colComponents = new List[getColumnCount()];
        for (int i = 0; i < getColumnCount(); i++) {
            colComponents[i] = new ArrayList<Component>();
        }

        rowComponents = new List[getRowCount()];
        for (int i = 0; i < getRowCount(); i++) {
            rowComponents[i] = new ArrayList<Component>();
        }

        for (Object element : constraintMap.entrySet()) {
            Map.Entry entry = (Map.Entry) element;
            Component component = (Component) entry.getKey();
            CellConstraints constraints = (CellConstraints) entry.getValue();
            if (takeIntoAccount(component, constraints)) {
                if (constraints.gridWidth == 1) {
                    colComponents[constraints.gridX - 1].add(component);
                }

                if (constraints.gridHeight == 1) {
                    rowComponents[constraints.gridY - 1].add(component);
                }
            }
        }
    }
private void initializeColAndRowComponentLists ( ) { colComponents = new List [ getColumnCount ( ) ] ; for ( int i = 0 ; i < getColumnCount ( ) ; i ++ ) { colComponents [ i ] = new ArrayList < Component > ( ) ; } rowComponents = new List [ getRowCount ( ) ] ; for ( int i = 0 ; i < getRowCount ( ) ; i ++ ) { rowComponents [ i ] = new ArrayList < Component > ( ) ; } for ( Object element : constraintMap . entrySet ( ) ) { Map . Entry entry = ( Map . Entry ) element ; Component component = ( Component ) entry . getKey ( ) ; CellConstraints constraints = ( CellConstraints ) entry . getValue ( ) ; if ( takeIntoAccount ( component , constraints ) ) { if ( constraints . gridWidth == 1 ) { colComponents [ constraints . gridX - 1 ] . add ( component ) ; } if ( constraints . gridHeight == 1 ) { rowComponents [ constraints . gridY - 1 ] . add ( component ) ; } } } }
Initializes two lists for columns and rows that hold a column's or row's components that span
only this column or row.<p>

Iterates over all components and their associated constraints; every component that has a
column span or row span of 1 is put into the column's or row's component list.