Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is JTable and what is its purpose?

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


Please Help Members By Posting Answers For Below Questions

What is swing control in java?

1058


What is the use of swing in java?

1063


What are the advantages of swing?

950


What is the purpose of transferhandler class?

1069


Why swings are called lightweight components?

1056


What is jfc? What are the features of jfc?

1034


What is the difference between invokeAndWait() and invokeLater()?

1077


Who created the swing?

933


What are the components of swing in java?

974


What are swing controls?

973


What are differences between swing and awt?

1020


What is java panel swing?

1006


How to print in java swing application?

946


Which window contains the swing controls?

947


Why would you use swingutilities.invokeandwait or swingutilities.invokelater?

962