Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Invisible column in JTable

Reply
Thread Tools

Invisible column in JTable

 
 
Ike
Guest
Posts: n/a
 
      08-20-2003
Anyone know how to make a column invisible in a JTable? I have tried setting
the width of the column to 0, but it still shows up with elipses (...) in
the column and hence a nominal width.

Anyone ev er encountered this? Thanks, Ike


 
Reply With Quote
 
 
 
 
Eric Sosman
Guest
Posts: n/a
 
      08-20-2003
Ike wrote:
>
> Anyone know how to make a column invisible in a JTable? I have tried setting
> the width of the column to 0, but it still shows up with elipses (...) in
> the column and hence a nominal width.


removeColumn() seems a good bet.


--
http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
 
Daniel Dyer
Guest
Posts: n/a
 
      08-22-2003
On Fri, 22 Aug 2003 09:05:51 +0300, timo <(E-Mail Removed)>
wrote:

> Ike wrote:
>
>> Anyone know how to make a column invisible in a JTable? I have tried
>> setting the width of the column to 0, but it still shows up with elipses
>> (...) in the column and hence a nominal width.

>
> Not really sure why you want to do this but if I were to really hide
> a column I would tinker with the data model so that its TableModel
> interface returns less data than what the model really contains.
> Of course one would need to add a couple of new methods for enabling
> the hidden data somehow.


That's along the right lines, but use the TableColumnModel rather than the
TableModel, it makes things easier.

Dan.


--
Daniel Dyer
Empathy Software (http://www.empathysoftware.com)


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Making 1 control invisible while showing another in the exact location of the invisible one Andy B ASP .Net 5 05-29-2008 03:08 AM
Invisible - Succinic acid : (AMBER ACID) Invisible krithika.143@gmail.com C++ 0 04-14-2008 06:59 PM
invisible JTable headers mehafi@gmail.com Java 2 08-23-2007 05:41 PM
Putting a JTable inside a JTable cell? Tivo Escobar Java 1 04-12-2007 11:09 AM
How to move data from a CSV file to a JTable, and from a JTable to a CSV file ? Tintin92 Java 1 02-14-2007 06:51 PM



Advertisments