Java JTable Row rowToModelIndex(JTable table, int row)

Here you can find the source of rowToModelIndex(JTable table, int row)

Description

row To Model Index

License

Open Source License

Declaration

public static int rowToModelIndex(JTable table, int row) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import javax.swing.JTable;

import javax.swing.RowSorter;

public class Main {
    public static int rowToModelIndex(JTable table, int row) {
        if (row >= 0) {
            RowSorter<?> rowSorter = table.getRowSorter();
            return rowSorter != null ? rowSorter
                    .convertRowIndexToModel(row) : row;
        }//from   w  ww. j  a v  a2s  .c om
        return -1;
    }
}

Related

  1. isRowInsert(TableModelEvent e)
  2. jtable$convertRowIndexToModel(JTable table, int index)
  3. makeIntoMoveRowUpButton(final JTable table, JButton button)
  4. packRows(JTable table, int start, int end, int margin)
  5. removeTableRows(DefaultTableModel model)
  6. setRowLines(JTable table, int row, int lines)
  7. setTableSize(JTable table, float percentage, int rows)
  8. setToRowBackground(Component c, JTable table, int row)
  9. updateTableSizes(JTable table, int rows)