click below
click below
Normal Size Small Size show me how
OOP - L5
JTable
| Question | Answer |
|---|---|
| part of Java Swing Package. | JTable |
| generally used to display or edit twodimensional data that is having both rows and columns. | JTable |
| Necessary Package in JTable | DefaultTableModel |
| implementation of the TableModel interface | DefaultTableModel |
| Provides a method to add, remove, and update rows and columns in a table. | DefaultTableModel |
| Necessary Package in JTable | import javax.swing.table.DefaultTableModel; |
| allows the user to access and manipulate the data displayed by the component. | .getModel() |
| allows the user to add a new row of data to JTable. | addRow() |
| removes the row at the specified position from the model. | removeRow() |
| used to retrieve the index of the currently selected row in a | getSelectedRow() |
| allows you to retrieve the value at a specified row and column index | getValueAt(int row, int column) |
| used to set the value in the cell at a specified row and column index within a JTable. allows you to update the value of a specific cell in a table. | setValueAt( object, int row, int column) |