Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JTable is not inserting the data

 
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I tried to insert to the value into the JTable, But I couldn't do it, Help me to resolve this.




Thanks and Regards,
Mahes
 
Sheriff
Posts: 21999
107
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Maheswaran Devaraj wrote:


The return of that method determines how many rows will be displayed. You will need to return something other than 0.
If you want to be able to add data, an Object[][] is a bad idea. A List<Object[]> will be a better idea; it will allow you to add rows (being Object[] instances). Also, use the fireXXX methods of AbstractTableModel after something has changed in your model, or you won't see the changes.
 
    Bookmark Topic Watch Topic
  • New Topic