public class JTables extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
adjustColumnWidths(JTable table,
int maxWidth)
Adjust the preferred widths of the columns of the given table
depending on the contents of the cells and headers.
|
static Set<Integer> |
convertRowIndicesToModel(JTable table,
Iterable<? extends Integer> viewRows)
Convert all of the given view row indices to model row indices
for the given table
|
static Set<Integer> |
convertRowIndicesToView(JTable table,
Iterable<? extends Integer> modelRows)
Convert all of the given model row indices to view row indices
for the given table
|
static void |
scrollToRow(JTable table,
int row)
Scroll the given table so that the specified row is visible.
|
public static void adjustColumnWidths(JTable table, int maxWidth)
table - The table to adjustmaxWidth - The maximum width a column may havepublic static void scrollToRow(JTable table, int row)
table - The tablerow - The rowpublic static Set<Integer> convertRowIndicesToView(JTable table, Iterable<? extends Integer> modelRows)
table - The tablemodelRows - The model row indicespublic static Set<Integer> convertRowIndicesToModel(JTable table, Iterable<? extends Integer> viewRows)
table - The tableviewRows - The view row indicesCopyright © 2018. All rights reserved.