How to merge cells in a JTable
1 posts in topic
Flat View  Flat View

Posted By:   lemort_christophe
Posted On:   Friday, April 4, 2003 04:35 AM

How can I merge cells dynamically in a JTable ?
Is it also possible to show/hide columns/rows dynamically ?

Thanks a lot

Re: How to merge cells in a JTable

Posted By:   Bahman_Barzideh  
Posted On:   Friday, April 4, 2003 06:36 AM

Three different question, each of which can take a long time by itself.
Here are some answers:

  • Merging cells: I have not done this myself. But some times ago I came across this web page. The third and fourth examples are of table's where cells are combined. I have not tried
    running these myself, but they might be of some help to you.

  • Hiding a row: Please see this forum topic.

  • Hiding a column: You can make a column disappear from a table by
    simply removing it from the table's column model. JTable.removeColumn () can accomplish this for you.
    To make the column appear again, add it back in by calling addColumn ().
  • About | Sitemap | Contact