Computer Science, asked by rajeev567890, 4 months ago

select the classes or interfaces that can be used to construct models to JTable.mark all correct items

a)TableamodelListener
b)DefaultTableModel
c)abstractTableModel
d)TableModel​

Answers

Answered by sanakhan76492
2

Answer:

Answer is (b) .......... . . ...

Answered by Jasleen0599
0

Option B) defaultTableModel

  • This is a TableModel implementation that stores the cell value objects in a Vector of Vectors. The column class returned by DefaultTableModel is Object. A TableRowSorter and DefaultTableModel combination will frequently utilise function toString() { [native code] }, which is costly for non-String data types.
  • JTable() creates a table with blank cells. Creates a table with the following dimensions: rows * cols. JTable(Object[][] data, Object[]Column): A table with the supplied name is constructed, and []Column specifies the names of the columns in the table.
  • Another effective Swing component for showing intricate data structures is javax.swing.JTable. Similar to JTree, JTable has its own package of utility classes called javax.swing.table and depends on a separate model object to store and represent the data it shows. The TableModel interface and its default implementations, AbstractTableModel and DefaultTableModel, are included in this package. It is simple to utilise JTable without concern for the TableModel if your table data is neatly structured. If your data consists of a row array with an array of objects in each row, you can simply send this Object[][] to the JTable function Object() { [native code] }. An optional array of column names is also an option that you can specify. You only need to do this; the JTable takes care of the rest.

#SPJ2

Similar questions