• Post Reply Bookmark Topic Watch Topic
  • New Topic

JTable Problem

 
satya sahu
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,I am using a jTable. To it DefaultTableModel is passed. Initially the table has only one column and afterwards the no of columns may be 1 or 5. I tried doing it by using the setDataVector(...) method, but for this i am forced to use the setModel() method of the table. If i do this the initial model is changed. But my aim is to use the initial model and also do the required column updations.
Please help me to solve the problem. its urgent.
Thanx in advance.
 
Chris Brat
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
can you be more specific in terms of the goal you are trying to achieve and what your needs are regarding the JTable?
thanks
 
satya sahu
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Actually i have to read some data and update the table. Sometimes the no of columns may be 1 and sometimes 5. So the column numbers changes. How to achieve this keeping the same initial table model ??I don't want to use newModel each time the no. of column changes. I hope my goal is clear.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!