TableLayout implements LayoutManager2 { public int getColumnCount() { return columnCount; } TableLayout();  TableLayout(int columnCount); int getColumnCount(); void setColumnCount(int columnCount); void setCellColspan(int row, int col, Integer colspan); void setCellRowspan(int row, int col, Integer rowspan); void setTablePadding(int hpadding, int vpadding); void setTablePadding(Insets insets); void setRowPadding(int row, Insets insets); void setColumnPadding(int col, Insets insets); void setCellPadding(int row, int col, Insets insets); void setTableWeightX(Double weightx); void setRowWeightX(int row, Double weightx); void setColumnWeightX(int col, Double weightx); void setCellWeightX(int row, int col, Double weightx); void setTableWeightY(Double weightx); void setRowWeightY(int row, Double weighty); void setColumnWeightY(int col, Double weighty); void setCellWeightY(int row, int col, Double weighty); void setTableFill(Fill fill); void setRowFill(int row, Fill fill); void setColumnFill(int col, Fill fill); void setCellFill(int row, int col, Fill fill); void setTableAnchor(Anchor anchor); void setRowAnchor(int row, Anchor anchor); void setColumnAnchor(int col, Anchor anchor); void setCellAnchor(int row, int col, Anchor anchor); Component createHorizontalSpacer(); Component createVerticalSpacer(); @Override float getLayoutAlignmentX(Container target); @Override float getLayoutAlignmentY(Container target); @Override void invalidateLayout(Container target); @Override void addLayoutComponent(Component comp, Object constraints); @Override void addLayoutComponent(String name, Component comp); @Override void removeLayoutComponent(Component comp); @Override void layoutContainer(Container parent); @Override Dimension minimumLayoutSize(Container parent); @Override Dimension preferredLayoutSize(Container parent); @Override Dimension maximumLayoutSize(Container parent); static Cell cell(); static Cell cell(int row, int col); static Cell cell(int row, int col, int rowspan, int colspan); @Override String toString();  }
@Test public void testCoolnessOfTableLayout() { TableLayout layout = new TableLayout(3); assertEquals(3, layout.getColumnCount()); }