Class BookstoreTableModel

    • Constructor Detail

      • BookstoreTableModel

        public BookstoreTableModel()
        Default constructor - builds a sample data source.
    • Method Detail

      • getRowCount

        public int getRowCount()
        Returns the number of rows in the table model.
        Returns:
        the row count.
      • getColumnCount

        public int getColumnCount()
        Returns the number of columns in the table model.
        Returns:
        the column count.
      • getColumnClass

        public Class getColumnClass​(int column)
        Returns the class of the data in the specified column.
        Specified by:
        getColumnClass in interface TableModel
        Overrides:
        getColumnClass in class AbstractTableModel
        Parameters:
        column - the column (zero-based index).
        Returns:
        the column class.
      • getValueAt

        public Object getValueAt​(int row,
                                 int column)
        Returns the data value at the specified row and column.
        Parameters:
        row - the row index (zero based).
        column - the column index (zero based).
        Returns:
        the value.