This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Java in General and the fly likes Problem with JTable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Problem with JTable" Watch "Problem with JTable" New topic
Author

Problem with JTable

Code Snooker
Greenhorn

Joined: Oct 28, 2004
Posts: 4
Hi everybody !

I want to embbed a JTable in my application, that is having variable number of columns in different rows. For example,

row #1 has 3 columns,
row #2 has 1 column,
row #3 has 5 columns,
row #4 has 6 columna,
row #5 has 3 columns,
row #6 has 2 columns,
row #7 has 3 columns,
row #8 has 1 column
-------------------
-------------------
and so on...

I have only the information that how many columns are there in the particular row, but I don't know how to have varying number of columns for different rows.

Can you put some light over this matter?
Thanks in advance...


Paras


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br />Think 10 years ahead and start preparing for it right now.<br />~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jessica Sant
Sheriff

Joined: Oct 17, 2001
Posts: 4313

I'm going to move this to the Swing/AWT forum where they talk about JTable all the time.

So please post your replies there. Thanks!
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Problem with JTable