• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Two Jtables with abstract table model methods

 
Haris Tasawar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey all,
I need to display basically 3 jtables in one class using using hibernate and extending the class with abstracttablemodel. The problem is that i need to know how to use the abstract table model methods i.e getrowcount(), getcolumncount(), getvalueat() .... for all the three different jtables. Is it possible somehow? If its not the what should be the workaround for this???


Thanks,
Haris Tasawar.
 
Rob Camick
Ranch Hand
Posts: 2616
9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would start by using the DefaultTableModel. Then you don't have to worry about implementing your own custom TableModel.
 
Paul Clapham
Sheriff
Posts: 21416
33
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And if you do decide to use AbstractTableModel, and you need three different table models, then the obvious way to implement that would be to write three table-model classes which extended AbstractTableModel.
 
Haris Tasawar
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your replies guys...... i will start the classes implementation straight away.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic