0

thanks man i did it :):):):):)):):):):):):):):):):):):):):):):):):):):):):):):):):):):):):):): thanks alot your

Java Syntax (Toggle Plain Text)

1.
javax.swing.table.DefaultTableModel defaultTableModel = new javax.swing.table.DefaultTableModel();

javax.swing.table.DefaultTableModel defaultTableModel = new javax.swing.table.DefaultTableModel();
and this creates a second new one for your JTable
Java Syntax (Toggle Plain Text)

1.
Object rows[][] = { { "AMZN", "Amazon", "67 9/16" ,"DELETE","UPDATE"},
2.
{ "AOL", "America Online", "68 3/4" ,"DELETE","UPDATE"},
3.
{ "BOUT", "About.com", "56 3/8" ,"DELETE","UPDATE"},
4.
{ "CDNW", "CDnow", "4 7/16" ,"DELETE","UPDATE"},
5.
{ "DCLK", "DoubleClick", "87 3/16" ,"DELETE","UPDATE"},
6.
{ "EBAY", "eBay", "180 7/8","DELETE","UPDATE" },
7.
{ "EWBX", "EarthWeb", "18 1/4" ,"DELETE","UPDATE"},
8.
{ "MKTW", "MarketWatch", "29" ,"DELETE","UPDATE"},
9.
{ "TGLO", "Theglobe.com", "4 15/16" ,"DELETE","UPDATE"},
10.
{ "YHOO", "Yahoo!", "151 1/8" ,"DELETE","UPDATE"} };
11.
Object columns[] = {"Sr.no", "Book Title", "Author Name", "Delete", "Edit"};
12.
JTable table = new JTable(rows, columns);

Object rows[][] = { { "AMZN", "Amazon", "67 9/16" ,"DELETE","UPDATE"}, { "AOL", "America Online", "68 3/4" ,"DELETE","UPDATE"}, { "BOUT", "About.com", "56 3/8" ,"DELETE","UPDATE"}, { "CDNW", "CDnow", "4 7/16" ,"DELETE","UPDATE"}, { "DCLK", "DoubleClick", "87 3/16" ,"DELETE","UPDATE"}, { "EBAY", "eBay", "180 7/8","DELETE","UPDATE" }, { "EWBX", "EarthWeb", "18 1/4" ,"DELETE","UPDATE"}, { "MKTW", "MarketWatch", "29" ,"DELETE","UPDATE"}, { "TGLO", "Theglobe.com", "4 15/16" ,"DELETE","UPDATE"}, { "YHOO", "Yahoo!", "151 1/8" ,"DELETE","UPDATE"} }; Object columns[] = {"Sr.no", "Book Title", "Author Name", "Delete", "Edit"}; JTable table = new JTable(rows, columns);

You need to put all that data into defaultTableModel then do a

post helped :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.