• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

JTable Problem

 
Ranch Hand
Posts: 97
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic