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
Is swing an api?
What is jpanel swing?
Who created the swing?
How to render an html page using only swing.
What is a component in swing?
What is jfc? What are the features of jfc?
What is swing framework in java?
What are the two key features of swing?
What is the difference between applications and applets?
What is swing in java javatpoint?
Why are swing components called lightweight components?
What is swing used for?
What is import javax swing jframe?
Is java swing a framework?
What is the purpose of serialization in swings?