aspose file tools*
The moose likes Swing / AWT / SWT and the fly likes Can we set a sepecific font to a praticular column in Jtable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Can we set a sepecific font to a praticular column in Jtable" Watch "Can we set a sepecific font to a praticular column in Jtable" New topic
Author

Can we set a sepecific font to a praticular column in Jtable

Maheswaran Devaraj
Ranch Hand

Joined: Sep 14, 2007
Posts: 47
Hi All,

Can we set a specified font type to a particular column in the Jtable. If can please give me a sample.

Thanks in Advance,
Mahes
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10376
    
    8

You can do it by providing a custom renderer for the column.
http://java.sun.com/docs/books/tutorial/uiswing/components/table.html#editrender

[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
Maheswaran Devaraj
Ranch Hand

Joined: Sep 14, 2007
Posts: 47
while try with cell renderer, we can do it while click the particular column in the table. I want to do that default.

regards,
Mahes
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10376
    
    8

Maheswaran Devaraj wrote:while try with cell renderer, we can do it while click the particular column in the table. I want to do that default.

regards,
Mahes


I do not understand what you mean to say.
Can you please rephrase it?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> while try with cell renderer, we can do it while click the particular column in the table. I want to do that default.

you do it via the renderer, using the 'column' argument as the condition
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can we set a sepecific font to a praticular column in Jtable