Answer Posted / narmada
The JTable is used to display and edit regular two-dimensional tables of cells.
The JTable has many facilities that make it possible to customize its rendering and editing but provides defaults for these features so that simple tables can be set up easily. For example, to set up a table with 10 rows and 10 columns of numbers:
TableModel dataModel = new AbstractTableModel() {
public int getColumnCount() { return 10; }
public int getRowCount() { return 10;}
public Object getValueAt(int row, int col) { return new Integer(row*col); }
};
JTable table = new JTable(dataModel);
JScrollPane scrollpane = new JScrollPane(table);
| Is This Answer Correct ? | 10 Yes | 9 No |
Post New Answer View All Answers
What is the use of double buffering in swings?
Is java swing still used?
What is swing framework in java?
What does javax swing do?
What are the advantages of swing over awt?
What is swing gui in java?
How to move from one page to another in java swing?
What method is used to specify a container's layout?
What is swing components in java?
What is jlabel java swing?
What is swing control?
What is jpanel in java swing with example?
What are the benefits if Swing over AWT?
Is swing thread-safe?
What is double buffering ?