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
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply 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: 8441

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

[Donate a pint, save a life!] [How to ask questions] [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: 8441

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://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Can we set a sepecific font to a praticular column in Jtable
 
Similar Threads
Column Header in JTable
Jtable column headings
JTable
excel but in a jTable
JTable