예제 #1
0
        public static void setAllTableColumnWidth(JTable paramJTable, int paramInt)
        {
            TableColumnModel tableColumnModel = paramJTable.ColumnModel;

            for (sbyte b = 0; b < tableColumnModel.ColumnCount; b++)
            {
                TableColumn tableColumn = tableColumnModel.getColumn(b);
                tableColumn.PreferredWidth = paramInt;
            }
        }
예제 #2
0
        public static void adjustTableColumnWidths(JTable paramJTable, int paramInt)
        {
            TableColumnModel tableColumnModel = paramJTable.ColumnModel;

            for (sbyte b = 0; b < tableColumnModel.ColumnCount; b++)
            {
                TableColumn tableColumn = tableColumnModel.getColumn(b);
                if (tableColumn.Width > paramInt)
                {
                    tableColumn.PreferredWidth = paramInt;
                }
            }
        }
예제 #3
0
        public static void setAllTableColumnWidthFromAnotherTable(JTable paramJTable1, JTable paramJTable2)
        {
            TableColumnModel tableColumnModel1 = paramJTable1.ColumnModel;
            TableColumnModel tableColumnModel2 = paramJTable2.ColumnModel;

            if (tableColumnModel2.ColumnCount < tableColumnModel1.ColumnCount)
            {
                return;
            }
            for (sbyte b = 0; b < tableColumnModel1.ColumnCount; b++)
            {
                tableColumnModel1.getColumn(b).PreferredWidth = tableColumnModel2.getColumn(b).PreferredWidth;
            }
        }