Home arrow static arrow Java Programming [Archive] - JTable row size
Warning: Creating default object from empty value in /www/htdocs/w008deb8/wiki/components/com_staticxt/staticxt.php on line 51
Java Programming [Archive] - JTable row size
This topic has 3 replies on 1 page.

Posts:76
Registered: 10/25/02
JTable row size  
Jun 17, 2004 10:31 PM



 
Hi,

I have a JTable in which i am displaying different type of data.I want my table row to be displayed with dynamic row size.

If I have more data in one cell of a row which is exceeding the cell size, then that row size only should be dynamically increased so that it shows all data.

Thanks in advance,
amar
 

Posts:5,119
Registered: 16.08.01
Re: JTable row size  
Jun 17, 2004 11:34 PM (reply 1 of 3)



 
Have a look at FontMetrics to find out about the size of the data (Strings).

(in case that's what you wanted to read).
 

Posts:5,119
Registered: 16.08.01
Re: JTable row size  
Jun 17, 2004 11:39 PM (reply 2 of 3)



 
Please don't [url=http://forum.java.sun.com/thread.jsp?thread=531576&forum=57&message=2561603]crosspost[/url]. It cuts down on the effectiveness of responses, leads to people wasting their time answering what others have already answered, makes for difficult discussion, and is generally just annoying and bad form.
 

Posts:76
Registered: 10/25/02
Re: JTable row size  
Jun 18, 2004 12:06 AM (reply 3 of 3)



 
Thanks PhHein for replying.

I have seen FontMetrics .I couldnt get how to use this for my problem.How to use FontMetrics to make the table row size dynamic?
Is there are any sample code or example pls post it.

thank u,
amar
 
This topic has 3 replies on 1 page.